home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 38 / Amiga Format CD38 (1999-03-15)(Future Publishing)(GB)(Track 1 of 3)[!][issue 1999-04].iso / -seriously_amiga- / programming / other / cop / cop.doc < prev    next >
Text File  |  1999-01-25  |  140KB  |  2,829 lines

  1. $VER: COP Doc 1.17 (14.01.99) (c) THOR 09 Jan 1999
  2. *****************************************************************************
  3. **                                                                         **
  4. ** ___________                                                             **
  5. ** \        */                                                             **
  6. **  /-----------     #######     #######    ########                       **
  7. **  |    ^ |        ##      ##  ##     ##   ##     ##                      **
  8. **  |      _\       ##          ##     ##   ##     ##  Version 1.69        **
  9. **  |      |        ##          ##     ##   ########                       **
  10. **  |    --|        ##          ##     ##   ##                             **
  11. **  +-----/         ##      ##  ##     ##   ##                             **
  12. **   |   |           #######     #######    ## (c) 1993-1998 THOR-Software **
  13. **                                                                         **
  14. **                                                                         **
  15. **              A Low Level Debugger for all Amiga Systems                 **
  16. **                                                                         **
  17. *****************************************************************************
  18.  
  19.                                     by
  20.  
  21.      _______         _____  _____           __     _
  22.         /    /    / /    / /    /         \/_/    //_/_
  23.        /    /____/ /    / /____/   ___    /  ____// /        _      __
  24.       /    /    / /    / /   \           /  /|/ /  /  /   /_/ / /\_/_/
  25.      /    /    / /____/ /    /         _/__/_/ /__/|_/_/_/ /_/_/  /_
  26.                                               /                   
  27.  
  28.  
  29.  
  30. +-----------------------------------------------------------------------+
  31. |                                                                       |
  32. |       This release of COP is full FREEWARE...                         |
  33. |        ...but possibly the next release won't.                        |
  34. |                                                                       |
  35. |       You are free to copy this program, as long as:                  |
  36. |                                                                       |
  37. | - All files in this drawer are included.                              |
  38. | - ALL COMERCIAL USE IS STRICTLY PERMITED :                            |
  39. |       DON'T SELL WITHOUT PERMISSION OF THE AUTHOR !                   |
  40. |       DON'T INCLUDE IN COMMERCIAL PRODUCTS OR ARCHIVES WITHOUT        |
  41. |       PERMISSION OF THE AUTHOR !                                      |
  42. |                                                                       |
  43. | This  program  is  provided "as is" without warranty of any kind.     |
  44. | The entire risk  of using it is to the user himself.  In no event I   |
  45. | will be liable  for  direct or indirect damage, loss of data or       |
  46. | criminal actions done due to the use of this program.                 |
  47. | If you do not agree with this, you must not use COP.                  |
  48. |                                                                       |
  49. +-----------------------------------------------------------------------+
  50.  
  51. _____________________________________________________________________________
  52.  
  53.                          The THOR-Software Licence (v2, 24th June 1998)
  54.  
  55.  
  56. This License applies to the computer programs known as "COP". The "Program", 
  57. below, refers to such program. The "Archive" refers to the the original and 
  58. unmodified package of distribution, as prepared by the author of the Program.
  59.  
  60.  
  61. The Program and the data in the archive are freely distributable
  62. under the restrictions stated below, but are also Copyright (c)
  63. Thomas Richter.
  64. Distribution of the Program, the Archive and the data in the Archive by a
  65. commercial organization without written permission from the author to any
  66. third party is prohibited if any payment is made in connection with such
  67. distribution, whether directly (as in payment for a copy of the Program) or
  68. indirectly (as in payment for some service related to the Program, or
  69. payment for some product or service that includes a copy of the Program
  70. "without charge"; these are only examples, and not an exhaustive enumeration
  71. of prohibited activities).
  72.  
  73.  
  74. However, the following methods of distribution involving payment shall not 
  75. in and of themselves be a violation of this restriction:
  76.  
  77.  
  78. (i) Posting the Program on a public access information storage and
  79. retrieval service for which a fee is received for retrieving information
  80. (such as an on-line service), provided that the fee is not
  81. content-dependent (i.e., the fee would be the same for retrieving the same
  82. volume of information consisting of random data).
  83.  
  84.  
  85. (ii) Distributing the Program on a CD-ROM, provided that
  86.  
  87. a) the Archive is reproduced entirely and verbatim on such CD-ROM, including
  88. especially this licence agreement;
  89.  
  90. b) the CD-ROM is made available to the public for a nominal fee only,
  91.  
  92. c) a copy of the CD is made available to the author for free except for
  93. shipment costs, and
  94.  
  95. d) provided further that all information on such CD-ROM is redistributable
  96. for non-commercial purposes without charge.
  97.  
  98.  
  99. Redistribution of a modified version of the Archive, the Program or the
  100. contents of the Archive is prohibited in any way, by any organization,
  101. regardless whether commercial or non-commercial. Everything must be kept
  102. together, in original and unmodified form.
  103.  
  104.  
  105.  
  106.  
  107. Limitations.
  108.  
  109.  
  110. THE PROGRAM IS PROVIDED TO YOU "AS IS", WITHOUT WARRANTY. THERE IS NO
  111. WARRANTY FOR THE PROGRAM, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT
  112. LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
  113. PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. THE ENTIRE
  114. RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD
  115. THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY
  116. SERVICING, REPAIR OR CORRECTION.
  117.  
  118.  
  119. IF YOU DO NOT ACCEPT THIS LICENCE, YOU MUST DELETE THE PROGRAM, THE ARCHIVE
  120. AND ALL DATA OF THESE ARCHIVE FROM YOUR STORAGE SYSTEM. YOU ACCEPT THIS
  121. LICENCE BY USING OR REDISTRIBUTING THE PROGRAM.
  122.  
  123.  
  124.                                                         Thomas Richter
  125.  
  126. _____________________________________________________________________________
  127.  
  128.  
  129. I) Who should use COP ?
  130. ------------------------
  131.  
  132. - If you prefer working with the workbench or if you write programs in
  133.   pascal or (ARGH) basic, if you do not know how to use an assembler 
  134.   or are not familiar with bits and bytes, if you hate command interpreters 
  135.   and like funny gadgets and colorful menus, if you do not know the ASCII
  136.   character codes by heart :
  137.   
  138.   **======================================================**
  139.   || FORGET IT ! STOP NOW ! YOU WON'T BE HAPPY WITH COP ! ||
  140.   **======================================================**  
  141.  
  142.   To make it short: COP is intended to be used by REAL MEN ! (-;
  143.   (or WOMEN...)
  144.  
  145.         (Suggested: "Real men don't eat quiche" available on
  146.          in good networks...)
  147.   
  148. II) COP Features
  149. ----------------
  150.  
  151. Let's start with the bad ones:
  152.  
  153.         o)      it looks like an old-time debugger and feels like one, too
  154.         o)      there's no graphic user interface
  155.         o)      it's based on a command interpreter
  156.         o)      it's hard to learn
  157.         o)      it should support almost all MC68xxx, although I
  158.                 haven't tested it
  159.         o)      some features are available only with additional
  160.                 hardware, e.g. a MC68010 or higher or an external
  161.                 terminal
  162.         o)      some commands are available only with the 2.0 roms or better
  163.         o)      the build-in terminal emulation isn't a fast one
  164.                 and uses non-standard command sequences
  165.         o)      it does not handle fragmented memory models in a
  166.                 good way, although it's getting better
  167.         o)      there is no trackdisk or harddisk support and there
  168.                 never will be
  169.         o)      it does not use task switching, but busy-waits
  170.                 (ARGHH!)
  171.                 
  172.         Some of the points WILL change in the future, I promise...
  173.  
  174.                 
  175. ...and now the good ones:
  176.         o)      it does support all members of the MC68000-family,
  177.                 at least it should...
  178.                 (MC680000 thru MC68060 including FPUs, and MMUs)
  179.         o)      it supports the MMU partially.
  180.         o)      it provides a break key that can be assigned to
  181.                 any (well, almost any) key on the keyboard
  182.                 and that breaks almost everthing everytime.
  183.         o)      it uses hardware resources as less as possible
  184.                 (e.g. no blitter acesses, no copper on request)
  185.         o)      COP can be used to remote-debug a system over a
  186.                 serial connection, leaving the display and keyboard
  187.                 hardware to other programs
  188.         o)      COP catches almost all system crashes ("GURUs")
  189.         o)      COP can be used to debug almost all code, even 
  190.                 interrupts are NO problem (is there a second
  191.                 debugger that can ?)
  192.         o)      it can be made resident to debug startup code
  193.         o)      it supports symbols in its own language and
  194.                 the symbols in object modules. Source level
  195.                 debugging, however, is not supported.
  196.         o)      it has a funny documentation in broken english
  197.                 (speak you english ?)
  198.         o)      this new release supports printers, connected either to
  199.                 the parallel port of your Amiga or to an external terminal,
  200.                 provided it supports the new COP 5 terminal standard
  201.                 (see terminal.doc in this archive for more information)
  202.         o)      it can be loaded to a memory position of your choice,
  203.                 although the arguments are a bit tricky 
  204.         o)      it's free, at least this release...
  205.         o)      it steps thru everything, even interrupt code and
  206.                 supervisor programs. YES, exec's task scheduler is
  207.                 NO PROBLEM AT ALL.
  208.         o)      it can be used as a shell calculator and
  209.                 as a label database.
  210.         o)      it supports symbols in standard overlay segments
  211.                 (which other debugger does ?)
  212.         o)      it supports debugging of CLI/WB progs in C and BCPL
  213.                 thru a simplified interface
  214.         o)      it works in really almost all situations, even
  215.                 with execbase broken...
  216.         o)      it supports the ShapeShifter 
  217.         o)      it is compatible to the Enforcer and SegTracker if used 
  218.                 with a MC68020 or MC68030, and to "MuForce" for all
  219.                 processors. It might be compatible to Cyberguard, even
  220.                 though I won't recommend this program.
  221.  
  222.         
  223.         ...and if I say "almost all" I mean: more than any other
  224.         debugger can, but I am honest: There are situations where
  225.         COP CAN crash, but they are VERY rare.        
  226.  
  227.  
  228. III) Before you start, you need to provide...
  229. -----------------------------------------------------------------------------
  230. (or, in other words: NOT included in this package...)
  231.  
  232. - a lot of good will and your brain. COP is not easy to use...
  233. - this manual. Or to make it clear : READ THIS FIRST BEFORE YOU
  234.   START PLAYING WITH COP. There's a good chance you'll crash your
  235.   system.
  236. - an amiga computer with at least 512K. The more memory, the better.
  237. - If you want that magic break feature : A processor MC68010 or
  238.   higher would be fine. The break key does not work in all situations
  239.   with the standard MC68000.
  240. - If you need all commands (e.g. task capture and task freeze), you need
  241.   commodore's 2.0 roms or better.
  242. - If the program to debug requires the display subsystem, you need at least
  243.   an external serial tty terminal - this is the recommended way to debug
  244.   programs anyways.
  245. - If you want a fancier and better user interface, the external terminal
  246.   should understand type-3 terminal commands or better. Cause this is
  247.   a private format, there are not many... :-)
  248.   You may write your own terminal, or use the one supplied in this
  249.   package, see "terminal.doc".
  250. - If you need printer output, you need either a printer connected to the
  251.   parallel port of your Amiga or a printer connected to an external type-5
  252.   terminal or tty-terminal with printer-support. Any printer will do, COP
  253.   outputs only plain 7-bit ASCII.
  254.   Use the following configuration for your printer:
  255.         
  256.         o) data input from parallel interface
  257.         o) Auto-LF on, CR disabled (Auto-CR does not care)
  258.  
  259.   This is, however, the most common setting, so just try. The normal setting
  260.   will work in most situations without any change.
  261.  
  262.   If you MUST use the Amiga parallel port, use the command line switch
  263.   BUILDINPRT or the IOCD.Q command to disable external printing.
  264.  
  265.   The current version of COP is not able to debug a program via the parallel
  266.   port, though. It's exclusively reserved for printer output. If your program
  267.   requires the serial port, use the build-in terminal emulation.
  268.    
  269.  
  270. IV) Installing COP in your system
  271. -----------------------------------------------------------------------------
  272.  
  273. If you want to remote-debug your system: connect an external ASCII-terminal
  274. to the serial plug. Set the external terminal to the following parameters:
  275.  
  276. 9600 baud, 8 bit, 1 stop bit, no parity,
  277. no auto LF, no auto CR, non-erasing BS
  278.  
  279. If your external terminal supports printers, connect the printer to THIS
  280. terminal, not to the Amiga; if not, connect the printer to the parallel port
  281. of the Amiga and use the IOCD.Q command or the command line option 
  282. BUILDINPRT to tell COP to use the build-in printer-routines.
  283.  
  284. Copy the COP file to the C:-drawer of your system disk and, if you like to
  285. start COP from the workbench, copy the COP-icon anywhere you want (this is
  286. not required, only a nice feature ).
  287.  
  288. Copy the shell scripts "Debug","WBDebug" and "Calc" to the S: drawer,
  289. put this file in a save place wherever you want.
  290.  
  291. If you have commodore's V40 includes, copy the default data description
  292. table "Startup.DDT" to S:. You might want to modify it a bit, for example
  293. to correct the paths. This file currently expects the FD files in a
  294. device FD:, and the includes in INCLUDE:
  295.  
  296. If you want to run COP with the shapeshifter, copy the file "Mac.DDT" to
  297. S:, too.
  298.  
  299. Insert in your startup-sequence DIRECTLY FOLLOWING to the "SetPatch"-command
  300. (this is the second line for most systems) a command like the following:
  301.  
  302. COP keymap usa display resident ddt s:startup.ddt pre s:startup.pre
  303.  
  304. If you own a 040 or 060 based system, you should specify the "NOMMU" and
  305. "NOEMU" options as well.
  306.  
  307. What does this mean:
  308. -The build-in terminal uses the keymap "usa". If you prefer a different
  309.  keymap, change "usa" to your favourite keymap - it must be present in
  310.  the DEVS:keymaps drawer of your system.
  311.  YOU CAN'T CHANGE THAT KEYMAP WITH A "SETMAP" or "SETKEYBOARD" or the 
  312.  PREFERENCE PROGRAM LATER !
  313.  COP OPERATES INDEPENDED FROM THE REMAINDING SYSTEM !
  314.  
  315. -The "display" command tells COP to use the build-in terminal instead of an
  316.  external one. You can debug programs with the amiga keyboard on the amiga
  317.  monitor. If you want to remote-debug, use "serial" instead. If you've got
  318.  an external tty, I would suggest to do so.
  319.  
  320. -The "resident" keyword tells COP to stay resident even after reset. If
  321.  you do not need this feature: drop this argument. Loading COP as resident
  322.  program has the advantage that you can debug boot code.
  323.  
  324. -The "ddt" keyword loads the standard labels placed in the ddt-file and
  325.  commodore's include files into COP. If you don't have them:
  326.  Never mind, just delete the the last two arguments.
  327.  
  328. -The "pre" keyword instructs COP to build a pre-compiled image of the "ddt"
  329. file on first startup - they are faster to load and speed up booting. If
  330. you're low on disk space, drop this argument.
  331.  
  332. -The "nommu" keyword for 040 and 060 systems tell COP not to touch the MMU
  333. unnecessary. The MMU is required for these systems to guarantee reliable
  334. DMA access.
  335.  
  336. - The "noemu" keyword avoids catching of emulator traps for unimplemented
  337. 040 and 060 FPU instructions.
  338.  
  339. More about the command argument line later... (chapter XI)
  340.  
  341. You should also start the workbench with the "-debug" option to have COP
  342. ready in all situations.
  343.  
  344. For professional debugging, you should also install "MuForce" by the
  345. same author, and "SegTracker" and "MungWall", all by Michael Sinz. "MuForce" 
  346. is supported by COP, bus errors are routed thru COP, though. The "SegTracker"
  347. is used by COP to find the segment/offset information of a crashed program.
  348.  
  349. Save the modified startup-sequence and reboot your system. Not much to
  350. see? O.K., that's normal. COP is NOT a standard debugger and is only
  351. INSTALLED by the command line, but not STARTED.
  352.  
  353.  
  354.  
  355. V) How to start COP
  356. -----------------------------------------------------------------------------
  357.  
  358. There are many ways to begin a debug session with COP:
  359. -Double-click the COP-Icon, if you copied it to your system.
  360. -Enter in the shell the command:
  361.  
  362.         COP go
  363.  
  364. -Select the "ROMWack" (or "Debug") menu of the workbench. COP replaces
  365.  the old wack completly, if there was one installed in your ROM.
  366.  (Commodore removed the old ROM-Wack from the 3.1 Roms and replaced it
  367.  with the "SAD" debugger.)
  368. -Press the BREAK-key. In the build-in terminal - if you gave the
  369.  "display" argument above - this is the decimal dot of the numeric key-
  370.  pad. On external terminals, it's ESC. However, you may change that key
  371.  with an additional argument, see chapter XI.
  372. -Use the shell-scripts "Debug" and "WBDebug" to load programs,
  373.  symbols and start a debug session like with every other debugger.
  374.  Up to eight arguments are allowed here as CLI arguments, resp. one as
  375.  an extended selection icon "shift-selected" with the main icon.
  376. -The least pleasant way : Your system crashes and COP is entered auto-
  377.  matically. There are NO GURUs any longer, COP catches them all !
  378.  (Well, almost all... A special DOS crash isn't routed thru the standard
  379.   system requesters and can't be captured by COP - sigh.)
  380.  If you supply a data description file (see below), you even get the
  381.  guru codes in a readable language. If you installed "SegTracker", too, 
  382.  COP will also present the name, the segment number and the segment offset
  383.  of the code that crashed.
  384.  
  385.  
  386. VI) How to leave COP
  387. -----------------------------------------------------------------------------
  388.  
  389. Enter GOPG in the COP command line and press RETURN. This should start
  390. the program interrupted.
  391. If you entered COP by a guru, you should first debug the system or will
  392. get just another guru in mostly all cases. There's no good strategy to
  393. accomplish this task....
  394.  
  395. You may also start the old ROMWack from inside COP with the EXIT command.
  396. Starting with ROM versions 3.0, the system debugger has changed to the
  397. (more primitive ? different ?) SAD.
  398. See the autodocs how to use this thing...
  399.  
  400.  
  401. VII) A word about COP-terminals
  402. -----------------------------------------------------------------------------
  403.  
  404. You will normally use COP's build-in terminal to debug code, but this
  405. terminal will, of course, need some of the hardware systems - the display
  406. system, i.e. the copper and the display DMA channels (not the blitter),
  407. and the keyboard, also the parallel port if you want to print.
  408. I tried to implement the terminal as best as possible, but this may
  409. conflict with other programs which want to use the same hardware resources.
  410. For this reason COP can also be used to debug a system via the serial port.
  411. All you need - for the minimum configuration - is an external
  412. ASCII-terminal,e.g. a second amiga with a standard terminal program will
  413. do it.
  414.  
  415. In this case, choose the following transfer options:
  416.  
  417. 9600 baud, 8 bit, 1 stop bit, no parity
  418.  
  419. no auto CR, no auto LF, nonerasing BS
  420.  
  421.  
  422. However, things are much easier if you use a terminal program providing
  423. COP's private terminal formats, here called "type-3" or better terminals.
  424. The terminal transfer standard is documented in the "Terminal.doc" file
  425. in this drawer, if you want to write your own program. There are only
  426. two ready made programs supporting this standard:
  427.  
  428. -THOR's "Terminal" program for all Amigas provides a type-4 terminal
  429.  emulation and is included in this drawer.
  430.  
  431.  Enable the "COP Terminal Emulation" from the menu Settings/Protocol.
  432.  You also need to supply a null-modem connector, but you should know
  433.  how to build one...
  434.  
  435. -THOR's "DASB" terminal is a full type-5 terminal, working on
  436.  Atari 800XL computers with a serial interface box. It's included
  437.  in the package.
  438.  There are no settings to be made, DASB is written exclusively to communicate
  439.  with COP, but does not support a printer. This drawback arises from the
  440.  Atari XL hardware.
  441.  
  442. If you want to write a COP terminal on your own (e.g for a C64) you
  443. are welcome! Please send me an email in this case (address below).
  444.  
  445. The build-in terminal for non-remove debugging is of course a full
  446. type-5 terminal.
  447.  
  448.  
  449. Here a word about the keyboard processor of the build-in terminal:
  450.  
  451. I tried to write a keyboard parser not conflicting with other
  452. applications, i.e. it does not read the IRQ-registers of the CIA-
  453. chips and is able to work even with all interrupts disabled. However,
  454. there are "some" drawbacks of this magic stuff : Sometimes a key
  455. may "leak thru" the keyboard parser to other applications. Because
  456. the corresponding key-up event is missing, the keyboard device will
  457. then activate the auto-repeat loop and generate a stream of key-events.
  458. If this happens, leave COP and press the repeating key to stop it.
  459. Even worse, you won't recognise this bug if the affected key is a 
  460. control key like "Ctrl" or "Shift". If, after leaving COP, the key-
  461. board seems to be out of order, try pressing all this keys first to
  462. send their key-up events. I tried hard to fix this bug, but it looks
  463. like there's no better way to write a magic keyboard parser. If you
  464. want to use COP the professional way, you should work with an external
  465. terminal anyhow.
  466.  
  467.  
  468. VIII) How to enter commands, the line editor
  469. -----------------------------------------------------------------------------
  470.  
  471. Once you've entered COP, it presents you the prompt "COP >" and is ready
  472. to accept debug commands. Below the special keys used for line editing:
  473.  
  474. -The backspace key erases the last character entered and moves the
  475.  cursor backwards one line ("Delete" on some terminal). On some terminals,
  476.  Ctrl-H must be used as a substitution.
  477. -The delete key ("rub-out" on some terminals, Ctrl-Backspace with
  478.  DASB, not available on all terminals) deletes the character under the
  479.  cursor and scrolls the rest of the line backwards.
  480. -The return key starts the execution of the command ("Enter" on some
  481.  keyboards)
  482. -Ctrl-C aborts the execution of a command.
  483. -Ctrl-U re-displays the last command entered - there's only a two-line
  484.  history for commands, identical and empty lines will not enter the history.
  485. -The decimal dot on the numeric keypad (for the build-in terminal) or
  486.  the ESC-key on external terminals stops execution of code and enters
  487.  COP. However, this break feature wouldn't work if all interrupts are
  488.  disabled or, if you use the MC68000, the interrupt vectors are messed
  489.  up.
  490. -The cursor-forward-key moves the cursor forward one character (only
  491.  type-3 or higher terminals)
  492. -The cursor-backward-key moves the cursor backwards one character
  493.  (only type-3 and better)
  494. -The cursor-up key moves the cursor to the begin of the line (type-3
  495.  and better only)
  496.  As a replacement, Ctrl-A can be used for this task with TTY-terminals.
  497. -The cursor-down key moves the cursor to the end of the line (type-3
  498.  and better only)
  499.  A replacement for this key is Ctrl-E.
  500. -The Alt-Del key or Ctrl-Clear (with DASB) erases the whole line 
  501.  (type-3 only). This feature is available with Ctrl-B on all ASCII
  502.  terminals.
  503. -The TAB-key has a special meaning while entering data sequences and
  504.  is described below.
  505.  
  506.  
  507. IX) The COP commands and expressions
  508. -----------------------------------------------------------------------------
  509.  
  510. Each COP command looks like the following:
  511. - a four character command base name or a one character short-cut
  512. - optionally a dot and an extension that determinates a specific
  513.   sub-command of a larger command class
  514. - optional arguments each separated by space
  515.  
  516. ALL numbers accepted by COP MUST BE GIVEN IN HEXADECIMAL, all arguments
  517. may contain simple calculations with numerical operators. This will be
  518. called an EXPRESSION in the following, abbreviated with <expr>.
  519. Here all supported operators, listed by their priority from low to high
  520. (higher priorities are evaluated FIRST, please note that the priorities
  521.  differ from C - in special the shift operators):
  522.  
  523. $               trap operator
  524.                 a$b returns a if b is faulty, else a.
  525.                 NOTE: You cannot enclose $ in brackets, so expressions like
  526.                 (2$a+b)-3 are ILLEGAL !
  527.                 The reason for this is that COP can't continue to evaluate
  528.                 expressions with illegal syntax that will be trapped by $
  529.  
  530. ?,:             C-style condition operator:
  531.                 a?b:c returns b if a is not equal, else c
  532.  
  533. =,<>            equal, not equal: returns -1 if expressions to the
  534.                 right and left are equal (resp. not equal) or 0 otherwise.
  535.  
  536. >,>=,<,<=       signed greater, greater equal, smaller, smaller equal.
  537.                 Returns -1 if the condition is true.
  538.  
  539. |               binary or
  540. !               binary or
  541. ^               binary exclusive or (XOR)
  542. &               binary and
  543.  
  544. +,-             addition, subtraction
  545.  
  546. >>,<<           shift left or right. The left expression is shifted
  547.                 times the right expression
  548.                 
  549. *,/,%           multiplication, integer division, modulo
  550.  
  551. [..]            indirect operator: the value is the (long) content of
  552.                 the address specified by the expression between the
  553.                 braces, e.g. [4] is ExecBase.
  554. [..].l          same as [..]
  555. [..].w          indirect operator, returns the (sign extended) value of 
  556.                 the word at the address in braces
  557. [..].b          indirect operator, returns the (sign extended) value of
  558.                 the byte at the given address
  559. [..].o          the operator size is determinated by the instruction under
  560.                 the program counter.
  561.  
  562.                 NOTE: There is a slight difference if you read a word or a
  563.                 long from an even or odd address. Reading from an even
  564.                 address is only ONE memory access, but reading from an odd
  565.                 one are TWO or FOUR accesses. While not a problem to normal
  566.                 memory, this is a difference for hardware registers !
  567.  
  568. (..)            normal brackets: expression in the brackets is
  569.                 evaluated first
  570. -               unary minus, i.e. change of sign
  571. ~               unary not
  572. >               unary greater. This symbol contains the last address
  573.                 affected by COP and is called the "here" address pointer.
  574.                 It is affected by almost all commands and can be used
  575.                 for saying the new command should "work on the same
  576.                 address" as the last one.
  577. *               unary star. This symbol contains the program counter of
  578.                 the CPU and is equivalent to ".pc"
  579. .b,.w,.l,.o     Sign extension operators. Will interpret the preceding ex-
  580.                 pression as byte, word or long and sign-extend it.
  581.                 So $ff.b is -1, but $ff.w is $000000ff.
  582.                 The .o is again the sign-extension to the operator size
  583.                 of the instruction under the PC.
  584.                 There is a small, but noticable difference between
  585.                 [adr].b and ([adr]).b ! The first will read only ONE BYTE
  586.                 from memory, the later FOUR BYTES but throwing away three
  587.                 of them. This DOES make a difference if you read a
  588.                 hardware-register !
  589. .reg
  590.  or
  591. 'reg            The content of the CPU register .reg
  592. or              Valid registers are .d0 to .d7 for CPU data registers,
  593. reg             .a0 to .a7 for address registers - note that the
  594.                 meaning of .a7 changes with the supervisor bit -
  595.                 .ssp and .usp for the two stack pointers 
  596.                 .pc (same as *) for program counter and .sr for the
  597.                 status register (there is NO .ccr, use proper masking). 
  598.                 Also, there are 16 COP internal counter registers
  599.                 .c0 to .cf. They are incremented each time they are
  600.                 read and can be used to implement counter breakpoints.
  601.                 For some commands .fp0 to .fp7 are valid and address
  602.                 the eight FPU registers, if a FPU is installed and
  603.                 used by the program debugged.
  604.                 All other CPU/MMU/FPU registers are available in the same
  605.                 way, with one tiny exception for the MMU "root pointer"
  606.                 registers. These two registers are 64 bit wide for the
  607.                 68020/68851 and 68030 CPU/MMU and only the lowest long word
  608.                 containing the base address of the MMU table is read.
  609.                 If any of the MMU root pointers are written to, the high
  610.                 long word is set to $80000002, i.e. to setup a short 
  611.                 descriptor MMU table. This is the standard way how the MMU
  612.                 is used and I haven't seen any program that uses MMU
  613.                 tables with long descriptors.
  614. .sr,.se,.so
  615. .dr,.de,.do
  616.                 These pseudo registers refer to the source and
  617.                 destination effective address of the command under
  618.                 the program counter.
  619.  
  620.                 .sr     is the contents of the source register under
  621.                         the PC, if available
  622.                 .se     is the effective address of the source operand,
  623.                         if available
  624.                 .so     is either the content of the source register or
  625.                         the CONTENT of the effective source address 
  626.                 .dr,.de,.do
  627.                         Same for destination effective address
  628.                 You may alter all these registers to effect the source 
  629.                 or destination operand of an instruction. Although not
  630.                 causing an error, changing .se and .de does nothing
  631.                 usefull.
  632.  
  633.                 (Note: This feature is not yet implemented).
  634.  
  635.                 Additional, all supervisor registers of the 680x0 series
  636.                 can be viewed, as long as your CPU does support them,
  637.                 and will be written back as well as soon as you restart
  638.                 the program. However, read the special caveats about the
  639.                 MMU root pointers above. (Except that you shouldn't mess
  640.                 with the MMU anyways except you're perfectly sure what
  641.                 you're doing.)
  642.  
  643.                 A new special register .vvbr has been introduced 
  644.                 in release 1.32:
  645.  
  646.                 The .vbr register refers always to the VBR of the CPU,
  647.                 but since COP needs this register to operate properly,
  648.                 you should not change VBR this way. Whenever possible,
  649.                 check the value of VBR, and if it has changed, write
  650.                 the new value not to VBR. Use the VVBR instead, and 
  651.                 restore VBR to the value of the label COPVBR. COP will 
  652.                 then filter out its own exceptions and pass the unused 
  653.                 back to the system thru VVBR as if the VBR has been set. 
  654.  
  655.                 The change of VBR will now be detected by COP if the
  656.                 interupt check (ENVI.I) is turned on, and the VBR register
  657.                 can be restored by SETR.V. The autovector table can be
  658.                 rebuild automatically using the IRQ-copyback mode, enabled
  659.                 with the ENVI.C command.
  660.                 
  661. \character      The ASCII-code of the character following
  662.  
  663. $               Unary $. The number following is given in hexadecimal
  664.                 AS THIS IS THE DEFAULT, THIS SYMBOL DOES NOTHING
  665.  
  666. #               The number following is given in decimal, i.e.
  667.                 #16=$10=10
  668.  
  669. %               The next number is a binary number, i.e.
  670.                 %1000=$4=#4=4
  671.  
  672. label           A known label will be evaluated. By default there are
  673.                 only four labels:
  674.  
  675.                 AbsExecBase     will contain the value 4, thus is
  676.                                 pointing to the pointer of the system
  677.                                 library.
  678.                 Version         Will contain the version of COP as
  679.                                 Version<<16+Revision
  680.                 COPVBR          will contain the interal vector base
  681.                                 setup by COP. VBR should contain this
  682.                                 value.
  683.                                 DO NOT ALTER COP's vector base, use
  684.                                 VVBR instead.
  685.                 COPVVBR         will contain the default position of
  686.                                 COPs virtual vector base.
  687.  
  688.         Some read-only expressions follow:
  689.         (Not starting with a dot -> Not a (pseudo) register -> not alter-
  690.          able !)
  691.  
  692. l0              Left button of mouse or fire on joysticks connected to
  693.                 port 0, returns 0 if released or -1 if pressed
  694. l1              same for port 1
  695.                 l0 and l1 might be quite useful as conditions in
  696.                 breakpoints
  697. r0,r1           Right button of mouse in port 0 or 1
  698. m0,m1           Middle button of mouse in port 0 or 1
  699.         WARNING ! Some hardware limitation cause that it takes max.
  700.         20 msecs to read r0,r1,m0,m1. This COULD be made somewhat faster,
  701.         but nevertheless r0,r1,m0,m1 ARE NOT FAST ENOUGH TO BE USED IN
  702.         CONDITIONED BREAKPOINTS.
  703.         Reading them causes also the POTGO-hardware register to be trashed.
  704.         There is no way to save this register back, although
  705.         there is a POTGO-read register - this is a hardware limitation.
  706.  
  707. su,sr           Information about addressing mode under the PC. su and du are
  708. du,dr           TRUE if the source resp. destination operator of the actual
  709.                 instruction is used, sr and dr return TRUE if it is a register
  710.                 and FALSE if it is in memory.
  711.                 (This is actually not yet implemented)
  712.  
  713. op              Data type of the instruction under the PC, returns
  714.                 0 for byte, 1 for word or 2 for long, so 1<<op is the
  715.                 size in bytes of the operator.
  716.                 (This is actually not yet implemented)
  717.  
  718.  
  719. X) List of all commands
  720. -----------------------------------------------------------------------------
  721.  
  722. Long command    Short command   possible extensions     arguments
  723.  
  724. HELP            ?               none                    none
  725.                 prints all COP commands to the active terminal
  726.                 
  727. EXIT            X               none                    none
  728.                 If execbase valid, COP is terminated and the
  729.                 ROMWack is entered. Note that ROMWack works ONLY
  730.                 with an external terminal (if there is one... it
  731.                 has been removed from the 3.1 - V40 roms).
  732.                 
  733. REGS            R               G,E,C,A                 none
  734.                 Register dump commands
  735.                 
  736.                 Without extension:      Dumps all common CPU
  737.                 registers to the screen, dumps fpu registers
  738.                 if FPU is available and in use.
  739.                 
  740.                 REGS.G                  Dumps the guru number
  741.                 and the address that generated the crash. If COP
  742.                 was entered the normal way, the guru number will 
  743.                 be zero.
  744.                 If a data description table was loaded and 
  745.                 gurus were defined, the full name of the
  746.                 guru will be printed.
  747.                 If the "SegTracker" is available, COP will print the
  748.                 name of the crashing program and the segment/offset
  749.                 location of the PC within this program.
  750.                 
  751.                 REGS.E                  Dumps special purpose 
  752.                 registers of newer members of the MC68000 family as
  753.                 cache-control and MMU-registers. FPU registers will
  754.                 be included if the FPU is available and in use.
  755.                 
  756.                 REGS.C                  Dumps the COP-internal
  757.                 counter registers (without being incremented)
  758.  
  759.                 REGS.A                  Dumps effective address
  760.                 of instruction under PC and memory contents, if
  761.                 available.
  762.  
  763. DUMP            D               B,W,L,C,S,G,H,I,Q,Z,D,X,P,O     <expr>
  764.                 Dump memory. If <expr> is omitted, then the "here"
  765.                 pointer is used as address, otherwise change "here"
  766.                 to the given <expr>.
  767.                 
  768.                 without extension       Dump memory in the last mode
  769.                 used
  770.                 
  771.                 DUMP.B                  dump memory as bytes
  772.                 DUMP.W                  dump memory as words
  773.                 DUMP.L                  dump memory as longs
  774.                 DUMP.G                  dump a sequence of hardware
  775.                                         bytes. The memory manager gets
  776.                                         overridden by mode.
  777.                                         ! This might be somewhat danger-
  778.                                           ous, if you read some toggle
  779.                                           registers !
  780.                 DUMP.H                  dump hardware word
  781.                 DUMP.I                  dump hardware long
  782.                 DUMP.Q                  dump as quad word (=8 bytes)
  783.                 DUMP.Z                  dump as single precision
  784.                                         IEEE-numbers. 
  785.                 DUMP.D                  dump as IEEE double precision
  786.                 DUMP.X                  dump as MC68881 extended precision
  787.                 DUMP.P                  dump as MC68881 packed decimal
  788.                 DUMP.O                  dump memory as size of instruction
  789.                                         under PC
  790.                 
  791.                 DUMP.C                  Dump memory as characters.
  792.                 All unprintable characters are transcribed with a
  793.                 backslash and the numerical hex value followed.
  794.                 
  795.                 DUMP.S                  Dump memory as strings.
  796.                 All unprintable characters are displayed as a dot.
  797.                 
  798.  
  799.                 After dumping a few lines, COP stops and asks you
  800.                 to press RETURN or SPACE to continue. You may press
  801.                 here Q or Ctrl-C to abort dumping.
  802.                                 
  803.                                 
  804. EDIT            E               B,W,L,C,G,H,I,Z,D,X,P,O         <expr>
  805.                 Edit memory or hardware. If <expr> is omitted, then
  806.                 edit the address given by the "here" pointer. Else
  807.                 use the <expr> as address and save it to "here".
  808.                 
  809.                 In the edit mode, COP presents you the old contents
  810.                 of the address given. This value is now ready to be
  811.                 changed with the edit keys (see the last chapter).
  812.                 Press RETURN to accept the changes made or press TAB
  813.                 to undo the changes. Press Ctrl-C to abort editing.
  814.  
  815.                 BE WARNED! The string "d0" means "contents of register
  816.                 d0" not the value "d0", like everywhere in COP. To enter
  817.                 the value "d0", you've to type "$d0". Quite for the same
  818.                 reason we've "cf" as "contents of counter #f, increment it
  819.                 when read" and not "the number $cf". The later is "$cf".
  820.         
  821.         
  822.                 Without extension       use the last edit mode used     
  823.                 EDIT.B                  edit memory as bytes
  824.                 EDIT.W                  edit memory as words
  825.                 EDIT.L                  edit memory as longwords
  826.                 EDIT.Z                  edit as IEEE single precision
  827.                 EDIT.D                  edit as IEEE double precision
  828.                 EDIT.X                  edit as MC68881 extended precision
  829.                 EDIT.P                  edit as MC68881 packed decimal  
  830.                 EDIT.O                  edit memory as size of instruction
  831.                                         under PC
  832.                 
  833.                 EDIT.G                  set hardware as bytes
  834.                 EDIT.H                  set hardware as words
  835.                 EDIT.I                  set hardware as longwords
  836.                 
  837.                 The difference between the first group and the second
  838.                 is that the hardware edit commands do NOT read the
  839.                 hardware registers prior to the user change. Instead,
  840.                 a zero gets displayed. Node that this is necessary because 
  841.                 some hardware registers are WRITE ONLY.
  842.                 In all the modes presented above, you may enter a full
  843.                 <expr> as well as a numeric constant as a new value, 
  844.                 although the length of the <expr> is limited.
  845.  
  846.                 EDIT.C                  edit memory as characters
  847.                 
  848.                 Here, you may edit the memory as ASCII-characters. You
  849.                 may use the backslash followed by a hex number to enter
  850.                 values not available on the keyboard.
  851.                 
  852. EVAL            =               none                    <expr>
  853.                 Evaluate the expression given and print the result.
  854.                 The result might be a simple number, but very complex
  855.                 expressions including labels are valid, too.
  856.                 
  857. UNAS            =               none                    <expr>
  858.                 Unassemble code starting with address <expr> and set
  859.                 "here" to this value. If <expr> is missing, disassemble
  860.                 at address contained in "here".
  861.                 
  862.                 The disassembler knows the obcodes of all members of the
  863.                 Motorola MC68000 family, but the non-MC68000 codes are
  864.                 marked. FPU obcodes are disassembled as well, and numerical
  865.                 constants will be disassembled as decimal floating point
  866.                 expressions.
  867.                 Illegal opcodes or opcodes that can't be used on the Amiga
  868.                 (like the TAS instruction) get marked as well.
  869.  
  870.                 Depending on your enviroment settings - see the ENVI comand
  871.                 - some of the addresses will be expanded to known labels.
  872.                 
  873.                 NOTE: I was unable to test the correct disassembly of the
  874.                 MMU and MC68040 codes, although it SHOULD work.
  875.                 
  876.                 If the address being disassembled is the PC, this line
  877.                 is marked with an asterisk *; if it's the "here" pointer,
  878.                 the line is marked with ">".
  879.                 If the address is affected by a break point, a "B" is 
  880.                 inserted.
  881.                 
  882. NODE            N               L                        <expr>
  883.                 Display the node at address <expr>. If <expr> is not
  884.                 present, use the "here" pointer, otherwise set "here" 
  885.                 to the address of the node.
  886.                 
  887.                 No extensions        The name of the node and its type 
  888.                 is displayed.
  889.  
  890.                 L            Dump the node as before, but print
  891.                 additional information COP can gain about that node. COP
  892.                 knowns most node types defined in the Os and will print
  893.                 additional information contained in the data attached to 
  894.                 the node.
  895.  
  896.                 
  897.                 
  898. LIST            L               M,R,D,I,L,P,T,S,Q,B     <expr>
  899.                 Dump contents of exec-type lists.
  900.                 
  901.                 No extension            Dump the list at given address,
  902.                 set "here" to this address. If <expr> is omitted, use
  903.                 the "here" pointer.
  904.                 
  905.                 B                       Same as without extension, but
  906.                 the list is traversed from the last element to the
  907.                 first. This is sometimes useful if parts of the list
  908.                 are broken.
  909.                 
  910.                 M                       Print exec memory list
  911.                 R                       Print resources
  912.                 D                       Print loaded devices
  913.                 I                       Print software interrupts
  914.                 L                       Print libraries
  915.                 P                       Print ports
  916.                 T                       Print tasks
  917.                 S                       Print semaphores
  918.                 Q                       Print hardware interrupts
  919.                 
  920.                 
  921. FILL            F               M                       <expr>,<expr>
  922.                 Fill memory with byte sequence starting with first <expr>
  923.                 and to last <expr>, exclusive. If one of the <expr> is
  924.                 missing, then "here" is used. Then "here" is set to the
  925.                 first <expr>.
  926.                 
  927.                 without extension       Enter the byte pattern the memory
  928.                 should be filled with. Press TAB to complete one byte, press
  929.                 RETURN to complete the whole sequence and to start filling.
  930.  
  931.                 Again, "d0" is the register, not the value. The number is
  932.                 entered as "$d0".
  933.                 
  934.                 M                       Fill memory thru mask (stencil
  935.                 fill operation).        Enter first the byte sequence
  936.                 as described above, then enter the mask bytes. Each
  937.                 bit set to zero in the mask will protect the corresponding
  938.                 memory bit from a change.
  939.                 
  940.                 You may press Ctrl-C any time to abort the operation.
  941.                 
  942.  
  943. FIND            I               M,I                     <expr>
  944.                 Find byte pattern, masked, or find instruction starting
  945.                 with given address or "here". Set "here" to given
  946.                 expression afterwards.
  947.                 
  948.                 The found values are either dumped in the last mode used
  949.                 by the "dump" command, or disassembled with the "I" mode.
  950.  
  951.                 Furthermore, if the display is split, COP stops the search
  952.                 as soon as something is found and updates the top window
  953.                 of its screen, with the "here" pointer set to the found
  954.                 address. This is most useful for displaying a large area
  955.                 around the found bytes, and can be optained by displaying
  956.                 the output of a command like "d >-8" in the top window.
  957.                 To remind you, ">" is the name for the "here" pointer.
  958.                 More about display splitting is found below.
  959.  
  960.  
  961.                 without extension       Enter the byte pattern byte for
  962.                 byte pressing TAB after each byte and RETURN to complete
  963.                 the sequence you are searching for.
  964.  
  965.                 See above for caveats! "d0" is a register, not a number!    
  966.                 
  967.                 M                       Find masked. Enter the byte pattern 
  968.                 you are searching for and then the mask.
  969.                 Each bit left to zero in the mask will disable the
  970.                 comparision of the corresponding bit in the sequence, i.e.
  971.                 the corresponding bit in the byte pattern will be ignored
  972.                 and will match always.
  973.                 
  974.                 I                       Find instruction. Enter the
  975.                 instruction or part of instruction you want to search
  976.                 for and press RETURN to start the search. Case and extra
  977.                 spaces will be ignored.
  978.                 You should note that all known labels will be expanded
  979.                 by COP unless the enviroment is changed. So you should
  980.                 enter the label names instead of the address if you look
  981.                 for an access to a defined label !
  982.                 
  983.                 You may press Ctrl-C to abort the searching at any time.
  984.                 
  985.                 
  986.                 
  987. MOVE            M               none                    <expr>,<expr>,<expr>
  988.                 Move source memory block starting with first <expr> and 
  989.                 ending with second argument exclusive to destination
  990.                 given by last <expr>. If any of the <expr> is missing,
  991.                 "here" will be used. Afterwards, "here" is set to the
  992.                 start of the source memory block.
  993.                 Overlapping memory blocks will be handled correctly.
  994.  
  995.                 You may press Ctrl-C to abort the operation.                
  996.                 
  997.                 
  998. TASK            !               F,W,S                   <expr>
  999.                 Task commands: display,freeze and warm tasks, send
  1000.                 signals.
  1001.                 
  1002.                 without extension       Display information about the task
  1003.                 if <expr> is omitted and execbase is valid, the active task
  1004.                 will be displayed.
  1005.                 
  1006.                 F                       Freeze the given task (exclude from
  1007.                 execution). If the task to be freezed is the active one,
  1008.                 this command will work with Kickstart releases 2.0 or higher
  1009.                 only.
  1010.                 
  1011.                 W                       Warm the given task (include a
  1012.                 previously freezed task in task switching).
  1013.                 
  1014.                 S                       Send a signal to a task. You need to
  1015.                 supply two arguments, FIRST the signal to be send and
  1016.                 SECONDLY the task affected.
  1017.                 
  1018.                 
  1019.                 
  1020. SETR            S               F,E,D,V                  <expr>,reg
  1021.                 Set <expr> to given CPU register.
  1022.                 
  1023.                 without extension       Move given expression to a
  1024.                 destination register. All CPU registers are valid 
  1025.                 destinations, but only the low long word of the 64 bit
  1026.                 wide MMU registers of the 68851/68030 will be set, their
  1027.                 high-longword will be set to $80000002 always. This
  1028.                 word is just a dummy for the 68040 and 68060, but used
  1029.                 to identify the size of the descriptors and a "limit" value
  1030.                 for the 68851/68030. However, I don't remember any program
  1031.                 that makes actually use of these extensions.
  1032.  
  1033.                 If you need to change the vector basis register VBR
  1034.                 of 68010 or above, you should change COP's virtual
  1035.                 VBR called .vvbr instead to keep COP's exception
  1036.                 vectors untouched.
  1037.                 
  1038.                 F                       Load FPU register, if FPU is
  1039.                 available and in use by the program being debugged.
  1040.                 In this case, <expr> is a floating point number in the
  1041.                 usual notation (e.g. 3.1415 or 3E8 ...).
  1042.                 
  1043.                 
  1044.                 E                       With MC68020 or higher: enable
  1045.                 all caches. No arguments need to be supplied.
  1046.  
  1047.                 Warning: Don't touch the cache for 68040 or 68060 systems,
  1048.                 at least don't try to activate it by force if it is not
  1049.                 activated. DMA related device I/O might break by enabling
  1050.                 the cache in an I/O operation.
  1051.                 
  1052.                 D                       With MC68020 or higher: disable
  1053.                 all caches. No arguments taken.
  1054.  
  1055.                 Cache finetuning, if required, should be done by modifying
  1056.                 the cacr register directly.
  1057.                 
  1058.                 V                       With MC68020 or higher: Set the
  1059.                 virtual vector base address to VBR, setup VBR to point
  1060.                 to COPs interrupt vector table. This command should be
  1061.                 given (if it isn't already too late...) if a program
  1062.                 changes the VBR to give back control to COP.
  1063.  
  1064. STEP            Z               none                    <expr>
  1065.                 Enter trace mode, start tracing at given address or use
  1066.                 PC if <expr> is omitted.
  1067.                 How the trace mode works depends highly on the terminal
  1068.                 type used to debug. 
  1069.                 On pure ASCII-terminals, the command at the PC is being
  1070.                 disassembled and dumped to the terminal; on type-3 or
  1071.                 type-4 terminals however, an entire page of instructions
  1072.                 is printed. The command at the PC is marked with an
  1073.                 asterisk and is highlighted on type-4 terminals. Lines
  1074.                 with breakpoints are marked with a "B". The current
  1075.                 position of the "here" pointer is marked by ">".
  1076.                 
  1077.                 With both types of terminals, COP is now ready to accept
  1078.                 one of the following step commands by pressing the
  1079.                 desired key:
  1080.                 
  1081.                 Q or Ctrl-C     Abort trace mode and return to normal
  1082.                 command line.
  1083.                 
  1084.                 S or SPACE      Step the command at the PC. If this is a
  1085.                 subroutine call, the subroutine itself will be entered in
  1086.                 trace mode and can be stepped thru.
  1087.                 
  1088.                 T               Trace the next command. The only difference
  1089.                 between S and T is how subroutines are handled. With the T
  1090.                 command, the subroutine is called as it and will be exe-
  1091.                 cuted as whole without beeing stepped thru.
  1092.                 
  1093.                 N               Next command. Almost like T, but works
  1094.                 different with branches. The next command starts the program
  1095.                 at the current PC and COP regains control only if the
  1096.                 statement IMMEDIATLY FOLLOWING the traced statement gets
  1097.                 executed. This will be the same as T for all commands but
  1098.                 branch and jump commands. You may use N to step thru a
  1099.                 loop as whole if you press N for the end condition branch
  1100.                 of a loop. 
  1101.                 WARNING !!      If this loop has a second exit point, the
  1102.                 command after the end condition may never be executed and
  1103.                 COP is never entered again.
  1104.                 WARNING !!      The next command works ONLY IF THE STATE-
  1105.                 MENT IS IN RAM CODE and DOES CHANGE parts of the code by
  1106.                 setting an internal breakpoint. See BRKP-section for a list
  1107.                 of caveats of breakpoints.
  1108.                 
  1109.                 M               Trace until. Almost like T, but the mecanism
  1110.                 how COP regains control after a subroutine call is different.
  1111.                 The 'T' trace changes the return address to COP's entrypoint.
  1112.                 Sometimes this is unwise cause this address might get used
  1113.                 by the called procedure. If you use 'M' instead, the called
  1114.                 procedure will be stepped thru in 'S'-like behaivor using
  1115.                 the CPU's trace-bit. Of course, 'M' will be much slower
  1116.                 and should not be used if some piece of hardware is accessed
  1117.                 or timing is vital.
  1118.  
  1119.                 O               Skip command. Do not execute the command
  1120.                 at the PC and switch PC to the command following.
  1121.                 WARNING !!      Make sure that the command skipped does
  1122.                 not anything important and watch out for side effects,
  1123.                 e.g. skipping a "push long to stack" could be dangerous
  1124.                 if the corresponding stack cleanup command is not skipped
  1125.                 too.
  1126.                 
  1127.                 G               Start program at current PC, activate all
  1128.                 breakpoints.
  1129.                 
  1130.                 R               Dump registers to terminal.
  1131.                 
  1132.                 B               Set breakpoint at current PC address.
  1133.                 Note that commands with a breakpoint on it are marked
  1134.                 with a "B". Further, a breakpoint under the current PC
  1135.                 is "delayed", i.e. it isn't activated unil the the PC
  1136.                 leaves its address.
  1137.                 The breakpoint set by "B" will be an unconditioned type
  1138.                 (see BRKP for more about breakpoints)
  1139.                 
  1140.                 A               Alter display. If working with the build-
  1141.                 in terminal, the COP display is hidden and the display of
  1142.                 the program is brought to the monitor. The "A" command
  1143.                 is like the "IOCD" command without extension, read this
  1144.                 chapter to find more about COP displays.
  1145.                 If you use the remote-debug feature, this command does
  1146.                 nothing.
  1147.                 
  1148.                 F               Set COP to foreground mode, i.e. COP does
  1149.                 not hide its display if the program being debugged re-
  1150.                 gains control. Press F again to activate the normal display
  1151.                 swapping. This command works mostly like the "IOCD.F" 
  1152.                 command, read the "IOCD" section for more information about
  1153.                 COP foreground and background mode.
  1154.                 
  1155.                 
  1156.                 Some caveats about tracing are:
  1157.                 -------------------------------
  1158.  
  1159.                 - COP does not depend on exec-like task switching, it
  1160.                 is NO PROBLEM to step thru exec's task switching procedure.
  1161.                 (This is actually not a caveat !)
  1162.                 On the one hand a nice feature, on the other hand a problem
  1163.                 if you want to debug a SPECIFIC task. Therefore, you should
  1164.                 trace (T command) over a Wait() or Signal() call of exec.
  1165.                 The NEXT (N command) will work too, but if the same code
  1166.                 is used by two tasks - think about the trackdisk code - you
  1167.                 may catch a different task afterwards. Same goes for the
  1168.                 'M' command, but let me remind you again that 'M' is SLOW !
  1169.  
  1170.                 -The second problem with task switching is that if an exec
  1171.                 task looses control by stepping thru the task-switch 
  1172.                 routine, exec will save its status register with the trace
  1173.                 bit on. If the task is reactivated later, COP will regain
  1174.                 control over this task. While not a problem to COP, this
  1175.                 behaviour might somewhat confusing to you, if COP is
  1176.                 suddenly (probably after hours...) reentered - and not by a
  1177.                 guru.
  1178.                 -There's one extra problem with the trace (T) command :
  1179.                 This commands works by altering the return-address of a
  1180.                 subroutine call. Some programs use this return address to
  1181.                 fetch data following the subroutine call and adjust the
  1182.                 return address afterwards. If changed by COP, this
  1183.                 will cause a nice crash of your system. Thus, if you find
  1184.                 funny code behind a subroutine call, e.g. many illegals
  1185.                 or the like, STEP thru this procedure or use 'M'.
  1186.                 -Since stepping thru a procedure is much slower than
  1187.                 executing one, there may arise timing problems in some
  1188.                 critical IO-procedures. You should trace this kind of
  1189.                 subroutines to avoid such problems. This goes again for
  1190.                 the 'M' command, since this is nothing but "automated
  1191.                 stepping".
  1192.                 
  1193.                 (That looks like a lot of "features" of this debugger,
  1194.                 but they are typically for this class of programs.
  1195.                 However, most authors handle them as "undocumented
  1196.                 features", but I don't. :-) )           
  1197.                 
  1198.                 
  1199. BRKP            B               A,D,C,R,S,O             <expr>
  1200.                 Breakpoint commands. The address affected is given by
  1201.                 <expr> or by "here", if omitted. 
  1202.                 
  1203.                 without extension       If no breakpoint is set at
  1204.                 supplied address, a unconditioned breakpoint is set there.
  1205.                 If a breakpoint is set at this address, the breakpoint
  1206.                 is removed. Note that COP supports up to 32 breakpoints.
  1207.                 It is further important to note that after setting a 
  1208.                 breakpoint, it is not yet active, i.e. causes a COP inter-
  1209.                 cept. The breakpoints are activated each time a program is
  1210.                 restarted, e.g. with the GOPG command; they will get de-
  1211.                 activated each time COP is entered again to prevent an 
  1212.                 endless loop if a breakpoint is set in interrupt code.
  1213.                 However, the breakpoints can be activated by hand, although
  1214.                 this is not recommended.
  1215.                 
  1216.                 
  1217.                 BRKP.A                  Remove all breakpoints (no
  1218.                 arguments accepted)
  1219.                 
  1220.                 BRKP.D                  Display all set breakpoints
  1221.                 with conditions, no arguments accecpted.
  1222.                 
  1223.                 BRKP.C                  Clear breakpoint at given address
  1224.                 
  1225.                 BRKP.R                  Reset all COP counter registers
  1226.                 .c0 to .cf to zero.
  1227.                 
  1228.                 
  1229.                 BRKP.S                  Set breakpoint at given address
  1230.                 and condition, if any. If the condition is omitted, then
  1231.                 an unconditioned breakpoint is set. If a counter
  1232.                 register is included in the condition, it is reset to zero.
  1233.  
  1234.                 With a conditioned breakpoint COP is entered on a BREAK
  1235.                 hit only if the condition is true, i.e. not zero.
  1236.                 You should remember that a counter register is incremented
  1237.                 each time it is accessed, so you may use this feature
  1238.                 to implement counter breakpoints, e.g. ".c0>=5" will stop
  1239.                 execution after the fifth BREAK-hit.
  1240.                 
  1241.                 BRKP.O                  Activate all breakpoints (no 
  1242.                 arguments accepted). Note that this operation might
  1243.                 somewhat dangerous if a breakpoint in an interrupt
  1244.                 procedure gets activated. In this case, COP will display
  1245.                 its "COP crashed" or "Other Task Crashed" message... 
  1246.                 have fun!
  1247.                 
  1248.                 Some extra features of breakpoints are the "delay" of
  1249.                 breakpoints and the automatic removal of them:
  1250.                 -If you set a breakpoint under the current PC, this
  1251.                 breakpoint won't get active if you start the program,
  1252.                 but gets activated AFTER the PC leaves the statement. 
  1253.                 This is useful cause you usually never want to break 
  1254.                 on a command you already broke on. You will enter COP 
  1255.                 when the program reaches the breakpoint again.
  1256.                 -If an already activated breakpoint is getting written
  1257.                 over by a program (e.g. the memory is freed and another
  1258.                 task re-uses this area), this breakpoint is REMOVED
  1259.                 automatically at the time COP is entered again.
  1260.                 This is done to prevent programs from crashing by dangling 
  1261.                 breakpoints of a program that is no longer in memory.
  1262.         
  1263.                 WARNING !       The breakpoint IS NOT removed, if it
  1264.                 is not active at the time it is written over.
  1265.                 This MAY cause problems if the program changes and the
  1266.                 breakpoint is re-activated later, e.g. the breakpoint
  1267.                 may change the address part of a jump-instructions,
  1268.                 possible resulting in a nice fireworks display...
  1269.                 
  1270.                 WARNING !       Active breakpoints change the code
  1271.                 at their address to the ILLEGAL obcode. For this,
  1272.                 BREAKPOINTS DO NOT WORK IN ROM.
  1273.                 (Trick for MMU owners if you need to do this: Enable
  1274.                  the MMU bypass and set the breakpoint in the mirrored
  1275.                  RAM.)
  1276.                 Second, if the code is changed, possibly some check-
  1277.                 sums (for libraries or resident code) will change and
  1278.                 things won't work later. For this reason, use the
  1279.                 T S or M STEP subcommands to step thru this part of code,
  1280.                 they DO NOT ALTER the code and work in RAM as well as in
  1281.                 ROM.
  1282.                 
  1283.                 
  1284.                 
  1285.         
  1286. GOPG            G               U,T                     <expr>,<expr>
  1287.  
  1288.                 without extension       Start interrupted program at given 
  1289.                 address or at PC if <expr> is omitted. If any breakpoints
  1290.                 are set, activate them first. A second argument is not
  1291.                 accepted.
  1292.  
  1293.                 U                       Go until
  1294.                 Set a breakpoint at the first given <expr> and start
  1295.                 the program at the address given by the second argument,
  1296.                 or the PC if omitted. Read the breakpoint section about
  1297.                 caveats of breakpoints !
  1298.  
  1299.                 T                       Trace until
  1300.                 Step thru the program until the PC reaches the first
  1301.                 expression. The second expression will be loaded into the
  1302.                 PC if given. This will be very slow, like the 'M' sub-
  1303.                 command of STEP.
  1304.                 
  1305.                 
  1306. CAPT            C               S,N,C                     [<expr>,]<expr>
  1307.                 Capture a task, i.e. start debugging it.
  1308.                 
  1309.                 no extension            Capture the task with task
  1310.                 structure at the supplied address. If <expr> is omitted,
  1311.                 "here" is used. Afterwards, "here" is set to the
  1312.                 affected task address. If the task uses the FPU,
  1313.                 this capture command will work only with Kickstart
  1314.                 release 2.0 or later, due to the private exec stack frame
  1315.                 which has been changed in Rev. 2.0.
  1316.                 
  1317.                 S                       Like capture without arguments,
  1318.                 but the first argument you supply is a signal mask which
  1319.                 is send to the task before trying to capture it. The 
  1320.                 second argument is the address of the task structure.
  1321.                 
  1322.                 N                       Capture the next task getting
  1323.                 started. No argument must be supplied with this sub-
  1324.                 command. Note that you might find the new task in the
  1325.                 private dos startup code you have to step thru first.
  1326.                 
  1327.                 C                       Capture next command getting
  1328.                 started from the shell. This command works only with
  1329.                 Kickstart 2.0 or later.
  1330.                 
  1331.  
  1332.  
  1333. IOCD            O               S,C,B,F,R,Z,L,M,V,P,Q,I,E      <expr>
  1334.  
  1335.                 Input / output commands, terminal commands (rather a
  1336.                 lot of them...)
  1337.                 
  1338.                 without extension       (does not take any arguments)
  1339.                 If you work with COP's build in terminal, toggle between
  1340.                 COP's display and the display of the program being de-
  1341.                 bugged. This is not done by intuition or the like, but
  1342.                 by PURE HARDWARE. For this reason, COP needs to know the
  1343.                 address of the copper list of this program, and with the
  1344.                 ECS-chipset, the BEAMCON0 value. While both is available
  1345.                 in the graphics library, you must set them by hand if
  1346.                 execbase is destroyed or the program debugged uses the
  1347.                 hardware register to setup its display.
  1348.                 While COP can almost always establish its screen, it is
  1349.                 sometimes impossible to restore the programs screen
  1350.                 completely - some hardware registers are write-only.
  1351.                 In this case, you MUST use remote-debugging.
  1352.                 If foreground or background mode has been active (see
  1353.                 below) they are deactivated by the IOCD command.
  1354.                 
  1355.                 IOCD.S                  (does not take arguments)
  1356.                 Toggle between build-in terminal and remote-debugging.
  1357.                 If you switch to an external terminal, you should make clear
  1358.                 that this terminal is online, or you might fail to enter
  1359.                 a second IOCD.S to switch back to the build-in one.
  1360.                 Everytime the terminal is changed, COP retries to get the
  1361.                 terminals type to setup type-3 or type-4 communication.
  1362.                 For more information about COP's internal terminal format
  1363.                 and auto-identification read the "Terminal.doc" file
  1364.                 included in this drawer.
  1365.                 
  1366.                 IOCD.C                  <expr>
  1367.                 Set the address of the copper list of the user-program to
  1368.                 re-establish the user's display. If <expr> is omitted,
  1369.                 the "here" pointer is used. You won't need this command if
  1370.                 you debug programs that use the "standard" graphic system,
  1371.                 since COP extracs the address out of gfxbase itself. But
  1372.                 if the user's program uses the hardware registers directly,
  1373.                 COP does not recognize this change of the copper list.
  1374.                 In this case, search with the FIND command for a write to
  1375.                 the hardware register and set this value as user-copperlist
  1376.                 with IOCD.C <expr>. It is seldom easy to find it, so
  1377.                 good luck...
  1378.                 If you have problems with programs using custom copper
  1379.                 lists, you should try the interrupt driven display using
  1380.                 the IOCD.I command (then you get trouble with
  1381.                 interrupts instead of copper lists... ;-)               
  1382.                 
  1383.                 IOCD.I                  (does not take arguments)
  1384.                 Toggle between copper list driven display and interrupt
  1385.                 driven display.
  1386.                 The standard way for COP to display information is to
  1387.                 setup a copper list and to load it into the hardware. Later
  1388.                 on, if the program is started again, the system copperlist,
  1389.                 which can be set by IOCD.C, will be loaded back.
  1390.                 This will, of course, cause trouble if the program changes
  1391.                 the copper list on its own.
  1392.                 The best solution is of course to change to remote de-
  1393.                 bugging using IOCD.S, but startig with release 1.30 COP
  1394.                 can be forced to use a different method of display.
  1395.                 The interrupt driven display does NOT use copper-lists,
  1396.                 but uses the vertical blank interrupt to write the
  1397.                 hardware registers. COP tries its best to keep the program
  1398.                 setting valid, e.g. if the program disables the interrupt,
  1399.                 COP excludes the user VBI from running. However, this is
  1400.                 really a bit tricky and may fail. A second drawback is
  1401.                 that the display produced by interrupts is much simpler
  1402.                 and does, for example, not support line highlighting.
  1403.  
  1404.                 IOCD.B                  (does not take arguments)
  1405.                 Set COP to background mode, i.e. COP's display is never
  1406.                 setup and the users display is kept active. However,
  1407.                 you are still ready to enter commands. This mode is
  1408.                 somewhat impracticable since you don't see what you type.
  1409.                 
  1410.                 IOCD.F                  (does not take arguments)
  1411.                 Set COP to background mode, i.e. COP's display is not
  1412.                 removed from the monitor (only execption: a GOPG command
  1413.                 or the G subcommand of the STEP-command). Use this command
  1414.                 to avoid the flicker that occurs if the screen changes.
  1415.                 There's one caveat with this command and the STEP-command:
  1416.                 Since the displays are not swapped, the user program may 
  1417.                 destroy COP's display by writing to a hardware register or
  1418.                 may get unexepected results reading a register while COP's
  1419.                 display is active.
  1420.                 So watch out and disable the foreground mode if you want
  1421.                 to step this type of commands.
  1422.                 
  1423.                 IOCD.R                  (does not take arguments)
  1424.                 Disables foreground and background mode and restores
  1425.                 normal display swapping.
  1426.                 
  1427.                 IOCD.Z                  <expr>
  1428.                 Set the screen size of the build-in terminal to <expr>
  1429.                 lines. If <expr> is omitted, the actual display size
  1430.                 will be used.
  1431.                 The standard screen size is 28 (=$1C, remember COP always
  1432.                 thinks in HEXADECIMAL !) lines, but this might be too
  1433.                 large for some monitors. To prevent you grabbling at your
  1434.                 monitor, this command can be used to setup a fitting
  1435.                 display size. However, the screensize is limited to 8 to
  1436.                 28 lines and will always be centered.
  1437.                 
  1438.                 IOCD.L                  <expr>
  1439.                 Setup the number of lines until COP presents its ***more***
  1440.                 message to ask for continue. This number is more an 
  1441.                 approximate value as some outputs can't be broken up into
  1442.                 lines (for example the register display does never generate
  1443.                 a ***more*** message).
  1444.                 If <expr> is not given, the command uses the last value.
  1445.                 (Remember that COP thinks in HEX, so 10 is not TEN but
  1446.                 SIXTEEN !)
  1447.                 
  1448.                 
  1449.                 IOCD.M                  <expr>
  1450.                 Set the value to be written to BEAMCON0 if user display
  1451.                 should be rebuild. This command is not required unless
  1452.                 an application uses the hardware registers directly.
  1453.                 See IOCD.C and IOCD for more information about this
  1454.                 feature.
  1455.                 If possible, COP tries to build a NTSC-display because
  1456.                 it is less flickering than a PAL screen. I think there
  1457.                 should be no problems with this feature, even commodore's
  1458.                 @#!?!-monitor supports 60Hz displays and most european 
  1459.                 TVs will do so, too. If there are problems, use the next
  1460.                 option to use a PAL display instead, or use the PAL
  1461.                 command line option (see below). Some flicker fixers
  1462.                 might have problems with the long/short frame toggling
  1463.                 of the NTSC display, COP offers the PAL60 option.
  1464.  
  1465.  
  1466.                 IOCD.V            (does not take arguments)
  1467.                 Toggles the display mode between NTSC, PAL and PAL60.
  1468.                 ECS or better is required for this function.
  1469.                 
  1470.                 IOCD.P                  (does not take arguments)
  1471.                 Toggles printer output.
  1472.  
  1473.                 Not all commands cause a printer output, e.g. the edit
  1474.                 and step commands do not, since they are interactive.
  1475.  
  1476.         
  1477.                 IOCD.Q                  (does not take arguments)
  1478.                 Toggles printer support via the build-in printer driver
  1479.                 thru the parallel port of the amiga or the terminal
  1480.                 connected to COP (this is the default).
  1481.                 If you use the build-in terminal emulation, this command
  1482.                 will make no difference at all, but with an external type-5
  1483.                 terminal COP will either print itself or tell the external
  1484.                 terminal to start or stop printing. The later method is of
  1485.                 course the better one, it does not take over the parallel
  1486.                 port hardware.
  1487.  
  1488.                 All IO-commands but the L,S,P and Q subcommand don't make
  1489.                 sense in a remote-debug session and don't do anything in 
  1490.                 this case.
  1491.  
  1492.                 IOCD.E            (does not take arguments)
  1493.  
  1494.                 This command does not take any arguments. It will send a 
  1495.                 FORM FEED control character to the connected printer, to
  1496.                 eject the paper. This might be needed by some laser or
  1497.                 deskjet printers.
  1498.  
  1499.  
  1500. ENVI            V                       R,L,I,B,X,E,M,F,D,C,U,O  <expr>
  1501.                 Enviroment settings, mode settings and so on.
  1502.                 
  1503.                 without extension       Not valid. This command MUST
  1504.                 be extended.
  1505.                 
  1506.                 ENVI.R                  (does not take arguments)
  1507.                 Enter raw mode. In this mode,
  1508.                 execbase is not used at all. There are much consequences
  1509.                 of entering the raw mode: The display copper list and
  1510.                 beamcon0 must be set by hand (with IOCD.C and IOCD.M),
  1511.                 interrupts are disabled if COP is entered, all list
  1512.                 commands depending on exec-lists, all task commands and
  1513.                 all capture commands refuse to work. The EXIT command
  1514.                 is not available, too. The SegTracker interface will be
  1515.                 disabled, too.
  1516.                 There is no message if these commands are still entered.
  1517.  
  1518.                 All exceptions except interrupts cause now COP to inter-
  1519.                 cept, even if there is an exception handler installed in
  1520.                 the active task - normally it's no problem to run COP
  1521.                 parallel to a "normal" debugger, but in RAW-mode COP will
  1522.                 capture even its breakpoints.
  1523.                 
  1524.                 If you've entered the raw mode once, there's NO WAY
  1525.                 TO SWITCH IT OFF LATER except a power up or a reboot, 
  1526.                 so be careful !
  1527.                 
  1528.                 You should use the raw mode if you MUST debug a program
  1529.                 that uses the hardware directly. In most cases, it is
  1530.                 necessary to use remote debugging, too.
  1531.  
  1532.                 If you must use the chip-mem buffer, you are REQUESTED TO
  1533.                 USE the raw mode too, or you will run into BIG TROUBLE
  1534.                 with task switching activity.
  1535.                                 
  1536.  
  1537.  
  1538.                 ENVI.L                  <expr> <expr>
  1539.                 Add memory section. Cause COP does not use the exec
  1540.                 memory list, COP tries to find the memory portions
  1541.                 in your system on startup, i.e. chip mem, fast mem
  1542.                 and the kickstart ROM. However, COP cannot handle 
  1543.                 "too complicate" memory models, e.g. fast mem that
  1544.                 is split in several blocks or memory that is not
  1545.                 aligned to 64K borders.
  1546.                 To fit your needs, you may add a memory chunk of
  1547.                 your choice to COP's list.
  1548.                 The first argument specifies the start address of
  1549.                 the block, the second the (exclusive) end address,
  1550.                 if both are equal, this memory block will be removed 
  1551.                 from COP's private list.
  1552.                 
  1553.                 This memory list is used for the FIND and FILL commands,
  1554.                 memory is scanned for all addresses in it.
  1555.  
  1556.                 NOTE:           Normally, the memory in an Amiga is
  1557.                 typically not organized in a linear way, some memory parts 
  1558.                 are mirrored to others and the memory is possibly split
  1559.                 into some chunks, e.g. if you have a memory expansion
  1560.                 card in an old Amiga 2000B with ranger-memory (slowmem).
  1561.                 In this case, your fast mem will fill the addresses
  1562.                 0x00020000 to ??? and 0x000c8000 to 0x000d0000. In this 
  1563.                 case COP will search the total area from 0x00020000 to 
  1564.                 0x00d00000, including some hardware registers in between.
  1565.                 In this release, COP can not handle such complicated memory
  1566.                 models, maybe later...
  1567.                 (This is even better than pre-1.17 releases, which were un-
  1568.                 able to work with A4000 memory models at all....)
  1569.                                                 
  1570.                 ENVI.I                  (no arguments)
  1571.                 Disable the checking of changes of IRQ-vectors.
  1572.                 Under normal conditions, COP checks the consistency of
  1573.                 the MC68000 autovector table, used by COP to allow trace and
  1574.                 breakpoint commands. If one of the entries are changed,
  1575.                 you will be prompted by a message if it's O.K. to undo the
  1576.                 change, to accept it (in this case COP writes the change
  1577.                 back to its second vector table, which can be used by
  1578.                 ENVI.F), or to ignore one or all changes.
  1579.  
  1580.                 This change could be done by a faulty program, or
  1581.                 by a program that wants to regain control over the whole
  1582.                 system. In the first case it's better to answer U(ndo), in
  1583.                 the later C(hange). If you use a MC68000, the address in the
  1584.                 trace and illegal trap vectors are vital, and any change
  1585.                 of them will prevent COP from being able to step thru
  1586.                 programs. Also, COP needs at least one interrupt that
  1587.                 occurs "often enough" to check the status of the break key.
  1588.                 With a MC68010 or higher things are not that worse, cause
  1589.                 COP uses the VBR register to move the autovector table
  1590.                 to a different part of the memory. However, changes to
  1591.                 the old table will be respected, although COP does not yet
  1592.                 notice the change of the VBR register. In case you notice
  1593.                 that the VBR has been changed, set it back to the old
  1594.                 value which can be found in the label COPVBR and place the
  1595.                 new value in the virtual vector base called VVBR.
  1596.  
  1597.                 If you disable the IRQ-checking, all changes to the
  1598.                 autovector table are ignored.
  1599.  
  1600.                 ENVI.C                  (no arguments)
  1601.                 Enables the IRQ copy back mode.
  1602.                 Instead of watching the low-memory vector base, COP keeps
  1603.                 an eye on its own vector offset and copies the changed
  1604.                 vectors on request to the virtual vector base. This option
  1605.                 should be choosen if you want to debug a program that
  1606.                 directly writes to the vector base, like ShapeShifter.
  1607.                 The command line option "MacMode" enables this automatically.
  1608.                 Be warned: Enabling the copy back mode disables the check
  1609.                 for the low memory vector table, which is normally used by
  1610.                 the Amiga OS.
  1611.                 This check can be disabled with the ENVI.I switch described
  1612.                 above and works of course only for the MC68010 or better.
  1613.  
  1614.               
  1615.                 ENVI.B                  (no arguments)
  1616.                 Toggles the ChipMem backsave buffer.
  1617.                 The display build up by COP's internal terminal emulation
  1618.                 needs some chip memory that might be occupied by the
  1619.                 program you want to debug. If you want to prevent COP
  1620.                 from overwriting this area, you must:
  1621.                 o) provide a backsave area using the BUFFER keyword on
  1622.                    the command line when COP is installed
  1623.                    (usually in the startup-sequence)
  1624.                 o) enter the ENVI.B command to enable this buffer
  1625.                 o) you SHOULD use the Raw-mode to prevent conflicts with
  1626.                    multitasking
  1627.  
  1628.                 If the buffer is enabled, COP will backup the occupied 
  1629.                 memory area each time it builds its own display and will
  1630.                 restore it, if the program's display is restored later.
  1631.                 However, this backup mechanism is not (yet) fully trans-
  1632.                 parent to other parts of COP, but the UNAS and DUMP
  1633.                 commands keep care. It will be therefore convienent to 
  1634.                 place COP's CHIP hunk an uninteressting part of memory,
  1635.                 e.g. the display buffer of the debugged program would be
  1636.                 fine. To prevent problems with the blitter, COP will wait
  1637.                 for the blitter to complete before swapping the memory.
  1638.                 In all other cases the blitter will be just stopped.
  1639.  
  1640.                 ENVI.X                  (no arguments)
  1641.                 Affects the way the disassembler handles the indexed
  1642.                 indirect mode with label generation. The default is, that
  1643.                 the address which is used for label generation is given
  1644.                 by the base register plus the index. This is most com-
  1645.                 fortable if, for example, all entries of an indexed table
  1646.                 have labels associated to them. If, however, you want to
  1647.                 reassemble a part of code, this would be fatal since
  1648.                 all assemblers calculate the displacement, which will
  1649.                 be replaced by the label, as a distance to the base
  1650.                 register without the index. So if you switch out the
  1651.                 index inclusion, you will only see labels associated
  1652.                 to the base of a indexed table.
  1653.  
  1654.                 ENVI.E                  (no arguments)
  1655.                 Toggle the label generation on or off. If you do not want 
  1656.                 to see labels, for example in a search process looking for
  1657.                 a instruction with specific address, you can switch out
  1658.                 the label generation at all using ENVI.E
  1659.  
  1660.                 ENVI.M                  (no argument)
  1661.                 Toggle the build-in memory manager. This part of code
  1662.                 in COP protects you from writing into hardware and non-
  1663.                 existing memory, as well as it does the memory re-
  1664.                 mapping for the chipmem-buffer. If, for special purposes,
  1665.                 you want to disable this feature, use ENVI.M
  1666.  
  1667.                 ENVI.F                  (no argument)
  1668.                 Toggle the place where the exception vectors are stored.
  1669.                 The default location is at address 0, but since this is
  1670.                 chip memory, exception handling gets slow. If you use
  1671.                 ENVI.F, the vector base will be located in the fast-memory.
  1672.  
  1673.                 Warning! ENVI.F does NOT change the vector base register
  1674.                 at all, since it is pointing to COP's own vector base at
  1675.                 any time. Instead, it says COP where to look for the system
  1676.                 vectors, so it changes only the virtual vector base VVBR.
  1677.                 Warning ! ENVI.F will overwrite the virtual vector base
  1678.                 register VVBR of COP in order to work ! So do not use this
  1679.                 command if you setup your own VVBR.
  1680.  
  1681.                 This command only takes effect if running under a MC68010
  1682.                 or better, since the plain MC68000 does not have a VBR.
  1683.  
  1684.  
  1685.                 ENVI.D                  (no argument)
  1686.                 Toggle the default input radix, with is set up as hex,
  1687.                 to decimal and back.
  1688.  
  1689.                 ENVI.U            (no argument)
  1690.                 Toggle the MMU bypass. All COP memory accesses usually by-
  1691.                 pass the MMU of the 68020 or higher processors, so you see
  1692.                 the true physical addresses. This can be disasterous if COP
  1693.                 is used on an A3000 because disabling the MMU disables the
  1694.                 image of the OS, too. Use ENVI.U to tell COP not to touch
  1695.                 the MMU. That will have, however, certain consequences:
  1696.                 First, all addresses shown in COP will be logical addresses,
  1697.                 not the pure physical addresses. Reading or writing 
  1698.                 non-existant or pure system addresses with MuForce
  1699.                 enabled will cause COP to crash by a bus error (that's harm-    
  1700.                 less for COP, but you won't be able to alter these addresses
  1701.                 at all).
  1702.                 The command line option NOMMU can be used to enable this
  1703.                 option by default. In any case, be careful with it.
  1704.  
  1705.                 ENVI.O            (no argument)
  1706.                 This is a 060/040 specific setting. It selects whether COP
  1707.                 should bypass the non-implemented instruction exceptions
  1708.                 to the 68060/68040 library or capture them itself.
  1709.                 The command line option NOEMU does quite the same, namely
  1710.                 enabling the bypass.
  1711.  
  1712.                 It is, however, not yet clear if this option works or makes
  1713.                 any difference at all. *sigh*
  1714.         
  1715.  
  1716. SPLT            /               C               <expr>
  1717.                 This command is available ONLY if you use the build-in
  1718.                 terminal or an external type-3 or type-4 terminal. It
  1719.                 won't work with a raw ASCII-terminal.
  1720.                 
  1721.                 COP has the ability to split off a part of the screen for
  1722.                 displaying some information permantly. This information
  1723.                 in then updated each time you enter a command or COP
  1724.                 looses or regains control over the system. For example,
  1725.                 splitting the screen and displaying the register set in
  1726.                 the upper part of the screen while tracing is highly use-
  1727.                 ful and is nowadays standard for all debuggers.
  1728.                 Cause COP is "a little" different from "the common 
  1729.                 debugger", you must enable this feature by hand, and due 
  1730.                 to the raw display system, it's not available in general - 
  1731.                 a raw ASCII terminal can't split the screen.
  1732.                 
  1733.                 without extension       COP displays a new prompt and you
  1734.                 should enter a command that shall be executed each time
  1735.                 the display must be updated. The output of this command is
  1736.                 then displayed in a separated part of the display.
  1737.                 It is possible to execute more than one command if you
  1738.                 separate the commands by colons.
  1739.                 The argument following the SPLT-command determinates the
  1740.                 approximate size of the split-off part of the display 
  1741.                 (in lines; remember that all numerical values are HEX-
  1742.                 VALUES by default !). If there's not enough room, not
  1743.                 all commands will be executed.
  1744.                 
  1745.                 There are a few caveats to remember when using the SPLT-
  1746.                 command:
  1747.                 -Not all commands are splitable, e.g. the SPLT and the
  1748.                 STEP commands (since that doesn't make sense at all...)
  1749.                 -Some commands are splitable, but it's not very useful
  1750.                 to split them, cause they get executed each time the
  1751.                 display is updated, e.g. the GOPG and the EXIT commands.
  1752.                 -Almost all commands change the "here"-pointer. This is
  1753.                 NOT true for commands executed in the split-window, i.e.
  1754.                 they can READ "here", but do not change them.
  1755.                 This is somewhat useful since, while tracing, the "here"
  1756.                 pointer contains the address of the first command of the
  1757.                 lower window, e.g. splitting the command "d.w" will dump
  1758.                 the obcodes of the program in hex.
  1759.                 
  1760.                 Some useful commands for splitting:
  1761.                 REGS            will present a auto-updating register dump
  1762.                 NODE .a6        will print the name of the library pointed
  1763.                                 to by a6
  1764.                 DUMP.L .a0      will dump the memory pointed to by a0.
  1765.                                 (display will change if a0 changes, of
  1766.                                 course)
  1767.                 
  1768.                 (Remeber that you should supply a dot in front of the
  1769.                 register names to distinguish between registers and
  1770.                 addresses)
  1771.                 
  1772.                                 
  1773.                 Remember that you can execute more than one command once,
  1774.                 e.g. REGS:NODE .a6
  1775.  
  1776.         
  1777.                 Another idea about splitting is to use it when searching.
  1778.                 COP halts now searching as soon as something is found and
  1779.                 refreshes the split-off command, with the "here" pointer
  1780.                 set to the found command. Thus, splitting the screen with
  1781.                 a command like "u >-8" will disassemble the region around
  1782.                 the found byte everytime the search succeeds.
  1783.                 
  1784.                 
  1785.                 SPLT.C                  (no arguments accepted)
  1786.                 Remove the split window and return to normal operation.
  1787.  
  1788.  
  1789.                 NOTE:
  1790.                 This command is always executed if a part of COP causes
  1791.                 a crash. Mainly because this part could be the split-off
  1792.                 command, creating an infinite loop of crashes when re-
  1793.                 freshing the screen after the crash-message.
  1794.                 
  1795. SKTB            T               <expr>
  1796.                 Stack traceback.
  1797.  
  1798.                 Search the stack at the given address or at the address
  1799.                 given by the active stack pointer for data- and
  1800.                 code addresses. This will be useful if you want to find
  1801.                 out which part of code called a faulty procedure.
  1802.  
  1803.                 COP TRIES to find out if the data on the stack is
  1804.                 just garbage (which won't be printed) or a pointer
  1805.                 to data, or a return address to a piece of code.
  1806.  
  1807.                 In the later case, it tries to find a label near that
  1808.                 code address, to provide you with the name of the calling
  1809.                 routine.
  1810.  
  1811. LABS        A            E,S,B,G,T,V,A,U,L,F    [name]
  1812.                 Dump labels.
  1813.  
  1814.                 This command prints informations about label definitions
  1815.                 loaded into COP. A line dumped by this command will look
  1816.                 like the following:
  1817.  
  1818. label name    :    value    (+ base)        (flags)
  1819.  
  1820.                 Some labels are either relative to a base, which is printed
  1821.                 in hex if so, or relative to an exec node. It's name is
  1822.                 printed in this case.
  1823.  
  1824.                 The characters in the brackets specify the type of the 
  1825.                 label:
  1826.  
  1827.                 A    absolute address
  1828.                 E    equate. An easy to remember expression representing
  1829.                     a number.
  1830.                 N    an address relative to a node, thus, an offset.
  1831.                 V    a function vector of a library or a device.
  1832.                 R    an offset relative to an absolute base.
  1833.                 S    a size of something. Currently not supported.
  1834.                 B    a bit definition.
  1835.                 L    A lineA trap definition (not required by the
  1836.                     Amiga-OS, but by the Mac OS)
  1837.  
  1838.                 s    A COP internal (system) label. There are currently
  1839.                     only four system labels.
  1840.                 r    A read-only label.
  1841.                 k    A resident label, can't be removed with FLUSHALL
  1842.                 t    A temporary (so, user) label. Can be removed with
  1843.                     FLUSH.
  1844.  
  1845.  
  1846.                 The "name" argument specifies the label you'd like to know
  1847.                 information about. Wildcars are welcome here, COP knows
  1848.                 only two wildcards, '?' for one unknown character and '*'
  1849.                 for a sequence of unknown characters. If you don't give a
  1850.                 name, COP selects "*" for you as default, i.e. will show
  1851.                 all label.
  1852.  
  1853.                 The extensions specify the type of labels in the list:
  1854.  
  1855.         
  1856.                 LABS.E            [name]
  1857.                 Dump equates only.
  1858.  
  1859.                 LABS.S            [name]
  1860.                 Dump only sizes.
  1861.  
  1862.                 LABS.B            [name]
  1863.                 Dump bit definitions.
  1864.  
  1865.                 LABS.G            [name]
  1866.                 Dump gurus.
  1867.  
  1868.                 LABS.T            [name]
  1869.                 Dump line-A traps.
  1870.  
  1871.                 LABS.V            [name]
  1872.                 Print function vectors.
  1873.  
  1874.                 LABS.A            [name]
  1875.                 Print addresses. Absolute, relative or node relative.
  1876.  
  1877.                 LABS.U            [name]
  1878.                 Print all user defined (temporary) definitions.
  1879.  
  1880.                 LABS.L            [name]
  1881.                 Print all definitions.
  1882.  
  1883.                 LABS            [name]
  1884.                 Print all user defined addresses.
  1885.  
  1886.                 LABS.F            <expr>
  1887.                 Find the label nearest to and behind the given address.
  1888.                 This is useful if you know only the absolute address in
  1889.                 memory and want to relate it to the name of a subroutine
  1890.                 of your program.
  1891.         
  1892. SEGM        Q            <expr>
  1893.                 Find segment offsets.
  1894.  
  1895.                 This command takes a memory address and tries to find out
  1896.                 the program this memory belongs to. If successful, COP will
  1897.                 print the segment (=hunk) number of that program, and the
  1898.                 offset within that hunk the given address belongs to.
  1899.  
  1900.                 Michael Sinz' "SegTracker" must be active for this service!
  1901.  
  1902.  
  1903.                 
  1904. XI) COP arguments to the command line and ToolTypes for the Workbench
  1905. ---------------------------------------------------------------------
  1906.  
  1907. Here a list of arguments COP acceptes as arguments when getting started
  1908. from the shell. However, it's possible to start COP from the workbench
  1909. and to supply the same arguments as tooltypes. Simply create a tooltype 
  1910. of the same name for each keyword.
  1911.  
  1912.  
  1913. KEYMAP  <keymap>        Set the keymap COP should use for the build-in
  1914. terminal. Please note that you CAN NOT change this keymap with the
  1915. SetMap or SetKeyboard command. This keymap is of course not used for
  1916. remote debugging.
  1917. The keymap file is searched in the DEVS:keymaps drawer (not in KEYMAPS:
  1918. cause this logical device is not standard with Kickstart 1.2 or 1.3)
  1919. or in the keymap.resource. You need to supply AT LEAST AT STARTUP
  1920. a KEYMAP argument to define the keymap COP shall use. (There's no default
  1921. in this release, a missing keymap argument will result in an unusable
  1922. build-in terminal)
  1923.  
  1924.  
  1925. SERIAL                  Choose remote debugging
  1926. DISPLAY                 Choose build-in terminal for debugging
  1927. Note that you MUST supply the DISPLAY argument if you want to enter COP
  1928. by a shell command or COP will switch to remote-debugging.
  1929.  
  1930.  
  1931. LINES <number>          Set the number of lines of the build-in terminal
  1932. screen, the default is 28. This argument will be ignored if COP is already
  1933. loaded, use the IOCD.Z command instead.
  1934.  
  1935. BREAKKEY <number>       Set the keycode (NOT the ASCII-value !) of the
  1936.                         BREAK-key. This value will be used only by the
  1937.                         internal terminal emulation and will be ignored
  1938.                         under remote debugging.
  1939.                         Some useable keys (in other words: You
  1940.                         MAY use the return key, but...) are:
  1941.  
  1942.                         93      the asterisk on the numeric key pad
  1943.                         90      the braket-left key on the pad
  1944.                         91      the braket-right key nearby
  1945.                         74      the minus key on the pad
  1946.                         94      the plus key underwards
  1947.                         60      the dot on the key pat
  1948.                                 this is the DEFAULT.
  1949.                         
  1950.                         You may also use hex numbers if you place a $ or a
  1951.                         0x in front of them.
  1952.                                                 
  1953. RESIDENT                Load COP resident into memory, i.e. COP will survive
  1954. a reset if execbase is still o.k. and need not to be reloaded. This option
  1955. is useful if you want to debug startup-code. If used together with
  1956. MuForce, you might want to give the "RESTOREVBR" keyword as well, see 
  1957. below.
  1958.  
  1959. REMRESIDENT             Remove COP from the resident list and free all its
  1960. memory. Cause COP can not be removed completely, RESTART YOUR COMPUTER
  1961. IMMEDIATLY AFTER EXECUTING THIS COMMAND. Some code may write over COP's
  1962. still installed interrupt code resulting in a fireworks display or a crashed
  1963. harddisk (oh what a fun...).
  1964.  
  1965.  
  1966. GO                      Start a debug session using COP.
  1967.  
  1968. BUILDINPRT              Use the build-in printer support thru the parallel
  1969. port of the Amiga instead of the external terminal printer support. This
  1970. option works like the IOCD.Q command.
  1971.  
  1972. TERMINALPRT             The counterpart of BUILDINPRT: Use the printer pro-
  1973. vided by the terminal connected to COP. If you choose the build-in terminal
  1974. emulation, this won't make any difference. However, if you debug with an ex-
  1975. ternal terminal, the printing will be done thru its port and not thru the
  1976. amiga parallel port.
  1977.  
  1978.  
  1979. IRQDISPLAY              Select the buildin-terminal emulation, switch to
  1980. interrupt driven display. This acts like the IOCD.I command.
  1981.  
  1982. COPPERDISPLAY           Select the copper driven display as default.
  1983.  
  1984.  
  1985. IRQCOPYBACK             Select the IRQ copyback mode: COP does not watch the
  1986. low-memory interrupt vector table, but its own vector table and will copy
  1987. changes to the virtual vector base. This is the command-line counterpart of
  1988. the ENVI.C setting.
  1989.  
  1990. NOIRQCOPYBACK           The default operation of COP: Watch the standard
  1991. interrupt vector table, which is located at address 0 and up. Both checks
  1992. can be disabled with the ENVI.I switch.
  1993.  
  1994. RESTOREVBR              Instruct COP to re-install its own vector base 
  1995. register. This keyword is needed if COP is made resident and used in con-
  1996. junction with "MuForce". Since "MuForce" installs its own vector base table 
  1997. on top of COP, a resident copy of COP won't be able to capture enforcer hits 
  1998. any more. Use this option to restore the VBR of COP, right after 
  1999. installing MuForce. 
  2000.  
  2001. MACMODE                 This macro switch enabled some options and settings
  2002. required for COP to run safely under the "ShapeShifter" Macintosh emulator.
  2003.  
  2004. SET60                   Tell COP that a MC68060 processor is in your system,
  2005. although exec.library does not know. The standard Amiga OS 3.1 does NOT
  2006. recognize a '60 processor, the correct flags are usually setup later by
  2007. a tool provided by the hardware manufacturer, mostly the 68060 library.
  2008. If you want to run COP prior to these tools, specify the SET60 option.
  2009. This flag DOES NOT change the processor flags in the exec.library!
  2010.  
  2011. NOMMU                   Disable the MMU bypass. COP won't touch the MMU and
  2012. keep it active all the time - as needed for amiga models that use the
  2013. MMU to load an OS image or to guarantee reliable DMA operations, as the
  2014. 040 and 060 based Amigas. Disabling the MMU in this case will crash the 
  2015. system because the OS will vanish. This keyword is identical to the ENVI.U 
  2016. instruction.
  2017.  
  2018. MMU                     The default. COP bypasses the MMU for memory access, 
  2019. all addresses will be physical addresses. This is somewhat dangerous if the
  2020. MMU is required for system operation, as for '060 and '040 systems or if 
  2021. the MMU is used to map in a different version of the OS.
  2022.  
  2023. NOEMU                   Instruct COP to bypass the 060/040 emulator traps to
  2024. the 68060.library or 68040.library - which must be installed and running 
  2025. at the time COP is launched. These exceptions are generated if the 
  2026. 68060 detects an instruction that is not supported by the CPU directly 
  2027. but has to be emulated in software.
  2028.  
  2029. It is, however, not quite clear if this option makes any difference at all,
  2030. or if it works - simply because I don't own a '060 for testing.
  2031.  
  2032. EMU                     The opposide and default setting. COP captures all 
  2033. emulator traps as software failures.
  2034.  
  2035. The next three options contol the video mode used by COP for its own display:
  2036.  
  2037. NTSC                    Use a NTSC screen for the debugger screen. This has
  2038.                         been the default for versions up to 1.56.
  2039.  
  2040. PAL                     Use a PAL screen instead. This is, however, more
  2041.                         flickering but required for some TVs.
  2042.  
  2043. PAL60                    This is a display mode half between PAL and NTSC.
  2044.                         It uses the base frequency of NTSC, 60Hz, but does
  2045.                         no long/short line toggling, like PAL. This mode
  2046.                         might be required to display 60 Hz with some oldish
  2047.                         flicker fixers.
  2048.  
  2049. Now some options that tell COP where to place itself in memory. They do
  2050. not work if COP is already loaded !
  2051.  
  2052. CODE where              Tell COP where to place its CODE segment. where
  2053. might be:
  2054.         FORWARD         Allocate memory from the beginning of the memory
  2055.                         area, so COP is placed at LOW addresses.
  2056.                         This is impractical in most cases.
  2057.  
  2058.         REVERSE         Allocate memory from the end of the memory, so
  2059.                         COP is placed at HIGH addresses. This was the
  2060.                         default up to release 1.18.
  2061.  
  2062.         address         Place COP at an absolute address, given in decimal
  2063.                         or in hex if preceded by $ or 0x.
  2064.                         This memory area must be available, as long as you
  2065.                         do not use the FORCE option.
  2066.  
  2067. DATA where              Tell COP where to place the DATA section. The 
  2068.                         argument is the same as above.
  2069.  
  2070. BSS  where              ...same for BSS section
  2071.  
  2072. CHIP where              ...same for CHIP section. If you use an absolute
  2073.                         address here, make shure it is in chip mem !
  2074.  
  2075. LABEL where             ...same for LABEL section, which is needed if
  2076.                         you give a DDT (see below) and containes 
  2077.                         the names and addresses of DDT labels.
  2078.  
  2079. BUFFER where            Tell COP to use a chip-memory backup buffer and
  2080.                         place it according to the argument. You MUST
  2081.                         provide this argument if you want a chipmem backup
  2082.                         area, or the ENVI.B command won't work.
  2083.  
  2084. RESIDENTSTRUCT where    Tell COP where to place the resident structure that
  2085.                         is needed for COP to keep resident over resets.
  2086.                         This argument is only useful if you use the
  2087.                         RESIDENT switch too.
  2088.  
  2089. FORCE                   Tell COP to use the specified memory, even if it is
  2090.                         occupied by another program. WARNING !
  2091.                         YOU SHOULD BE REALLY SURE WHAT YOU ARE DOING if
  2092.                         you MUST use this option ! Portions of code of
  2093.                         other programs might get overwritten by COP, causing
  2094.                         a fantastic crash !
  2095.  
  2096. FLUSH                   Flush labels loaded as symbols from a segment,
  2097.                         e.g. loaded by CLIDEBUG or WBDEBUG.
  2098.                         This is done automatically every time if you
  2099.                         specify CLIDEBUG or WBDEBUG.
  2100.                         However, the labels defined in the DDT file
  2101.                         are left alone.
  2102.  
  2103. FLUSHALL                Flush all labels, even those defined in a
  2104.                         DDT file. The system labels AbsExecBase, Version
  2105.                         COPVBR and COPVVBR survive.
  2106.  
  2107. CLIDEBUG                Debug a program using the Shell interface. If
  2108.                         you want to give arguments to the program to
  2109.                         debug, INCLUDE THE COMMAND AND ITS ARGUMENTS
  2110.                         in double qoutes. Since a colon and an asterisk
  2111.                         is interpreted by COP as the beginning of a
  2112.                         comment, you MUST enclose these characters
  2113.                         in an additional pair of single quotes.
  2114.                         To simplify this, you might use the DEBUG
  2115.                         script.
  2116.                         CLIDEBUG always flushes the labels.
  2117.  
  2118. WBDEBUG                 Debug a program thru the workbench interface.
  2119.                         If you want to support a second icon which is
  2120.                         simulated to be clicked with the main program's
  2121.                         enclose THE MAIN AND THE SECOND ARGUMENT IN
  2122.                         DOUBLE QUOTES. DO NOT ADD ANY .INFO TO THE
  2123.                         NAME, even if you load an icon of project type.
  2124.                         The responsible program will be found and be
  2125.                         loaded.
  2126.                         WBDEBUG always flushes the labels.
  2127.  
  2128. SYMBOL                  Add the symbols of the given binary file to
  2129.                         the label buffer. To do so, you MUST support
  2130.                         the base address of the segment using
  2131.                         SEGMENT or FIRSTHUNK.
  2132.                         Adding of additional labels might be necessary
  2133.                         if you debug an overlayed program. COP cannot
  2134.                         load all labels on startup, since it is not clear
  2135.                         where the overlay nodes will be placed in memory.
  2136.                         Remember the base address of the program if loaded;
  2137.                         Later on, if the overlay nodes are present, reload 
  2138.                         the symbol table by FLUSH SYMBOL <progname>
  2139.                         FIRSTHUNK addr. 
  2140.  
  2141. FIRSTHUNK               Give the APTR to the first byte of the first hunk
  2142.                         to which the labels to be loaded belong.
  2143.                         Either FIRSTHUNK or SEGMENT MUST BE USED as an
  2144.                         additional argument if you use SYMBOL.
  2145.  
  2146. SEGMENT                 Give the BPTR, as available from LoadSeg(),
  2147.                         of the segment to which the labels to be loaded
  2148.                         by SYMBOL belong.
  2149.                         Either this or FIRSTHUNK IS REQUIRED for SYMBOL.
  2150.  
  2151. CALC                    Calculate the expression given. Everything COP's
  2152.                         EVAL command can evaluate is valid here, even
  2153.                         defined labels. So to read the value of ExecBase
  2154.                         using the Shell is quite easy:
  2155.                         COP CALC [AbsExecBase]
  2156.                         Note that this allows using COP as a symbol data-
  2157.                         base, e.g. to remember the system entry points.
  2158.  
  2159.                         COP CALC OpenLibrary
  2160.                         will give the offset of the OpenLibrary system
  2161.                         call, provided you added it using a DDT.
  2162.                         The only caveat is that COP will assume all
  2163.                         numbers are in DECIMAL unless preceeded by $.
  2164.                         (Different to how expressions are handled usually!)
  2165.                         The $ notation, however, may conflict with
  2166.                         shell variables, so enclose the argument, also
  2167.                         if it contains spaces, in double quotes.
  2168.  
  2169.  
  2170. If you want to build an icon to start COP from the workbench, use for
  2171. example the following tooltypes:
  2172.  
  2173. DISPLAY                 MUST be present to prevent COP from remote-
  2174.                         debugging mode.
  2175. GO                      MUST be present if you want to start COP.
  2176.  
  2177.  
  2178.  
  2179. DDT file                Setup COP's labels using a data description
  2180.                         table. The syntax of this file is descripted
  2181.                         below, and a default table "startup.ddt" is
  2182.                         included in this drawer. If you want to run COP
  2183.                         together with the macintosh emulator, you should
  2184.                         specify the macintosh-version of the ddt file
  2185.                         called MAC.ddt and the MACMODE command line
  2186.                         switch.
  2187.  
  2188.                         You should use this option in your startup-
  2189.                         sequence to load all default labels.
  2190.  
  2191.                         It is fine to call COP again with this option
  2192.                         if you want to add some labels, however, if you want
  2193.                         to reload the table, you should flush all the
  2194.                         old labels with the FLUSHALL option.
  2195.  
  2196. PRE file                Provide or create a precompiled version of a DDT
  2197.                         file. If this argument is given, COP tries first to
  2198.                         read the label database from the "pre" file. If
  2199.                         this file is not available, COP will read the usual
  2200.                         DDT file and create a "PRE" file for you. The ad-
  2201.                         vantage of precompiling "DDT" files is that they
  2202.                         are parsed much faster. Their format is, however,
  2203.                         private.
  2204.  
  2205. Of course, if COP is already present, the code loaded will get started and
  2206. will not be loaded again (and therefore, some options are useless in this
  2207. case !)
  2208.  
  2209. If you want to debug a Shell program, this command line would be nice:
  2210.  
  2211. COP CLIDEBUG "c:copy s:Startup-Sequence to '*'"
  2212.  
  2213. will debug the copy command in copying the startup-sequence to the console.
  2214. Please note the necessary quotes around the command line and the star.
  2215.  
  2216.  
  2217. To debug a Workbench progam, say the Shell-Icon, type:
  2218.  
  2219. COP WBDEBUG "SYS:Shell"
  2220.  
  2221.  
  2222. Debugging overlayed programs is a bit tricky. First load the program
  2223. itself, e.g. with
  2224.  
  2225. COP CLIDEBUG "SetVNC"
  2226.  
  2227. Now write down the address of the breakpoint when COP is entered.
  2228. Step thru the code until a new overlay segment is loaded. To do so,
  2229. set a breakpoint in the overlay manager, which will always be the first
  2230. hunk of the program. Then, load the symbols of the overlay code using
  2231.  
  2232. COP FLUSH SYMBOL "SetVNC" FIRSTHUNK 0x<addr>
  2233.  
  2234. where addr is the address of the breakpoint you wrote down before.
  2235.  
  2236. One caveat using overlays is that the structure of the overlay table
  2237. depends on the overlay manager the program uses. There are quite a lot
  2238. of them, however, COP only knows the default one supplied with the
  2239. linker BLink or SLink. As an example, the overlay structure of
  2240. DPaint II or COP (yes, that's me...) is private and is not supported
  2241. by COP. In this case, you cannot load symbols which are placed in the
  2242. overlay nodes, sorry.
  2243.  
  2244.  
  2245. If you want to use COP with the shapeshifter macintosh emulator, I suggest
  2246. the following command line:
  2247.  
  2248. COP FASTVBR NOMMU MACMODE DDT S:Mac.ddt
  2249.  
  2250. plus your prefered keymap and display settings. COP can be entered from
  2251. the macintosh finder interface thru the hot key, as usual. Once entered,
  2252. the hardware traps are captured by COP, not by the MacOs. However, the
  2253. system failures (except those generated by hardware traps) are still left
  2254. to the Os. This might change in a future release.
  2255.  
  2256.  
  2257.  
  2258. XII) Syntax of a data description table
  2259. -----------------------------------------------------------------------------
  2260.  
  2261. The data description table contains information about labels, that are
  2262. litaral names given to addresses to make code more readable. COP intro-
  2263. duces a new concept of label creation not available with any other de-
  2264. bugger.
  2265. The labels are sorted by "type", as there are:
  2266.  
  2267. -       absolute labels, refering to one static address in memory.
  2268.         This is the only type of label most debuggers support.
  2269.  
  2270. -       equates. Those are simply names for numerical constants and
  2271.         are never used in actual disassembling. You may use it, how-
  2272.         ever, in expressions (and, in a release to come, in the
  2273.         microassembler)
  2274.         Typical equates are offsets of fields in structures.
  2275.  
  2276. -       node relative labels. If COP finds a specific base pointer
  2277.         points to a named exec-node structure (e.g. a library), this
  2278.         type of label is used to generate a name for the offset from
  2279.         the base of the node to the piece of memory which is addressed.
  2280.         A typical case is a entry point in a library, but also the full
  2281.         structure of a library can be addressed like that. So the default
  2282.         ddt includes the whole structure of execbase and gfxbase.
  2283.         Since the linking is done in the run time, it is not necessary
  2284.         to open these nodes, and the nodes even does not need to exist in
  2285.         memory while creating the labels.
  2286.  
  2287. -       address relative. This type is currently not used, but is
  2288.         useful if a base register is setup to point to the data region
  2289.         of a program. Typically, this will be a5 or a4.
  2290.  
  2291. -       a guru equate. This special type is used for giving readable
  2292.         names to guru meditations and is never used by the disassembler,
  2293.         but by the REGS.G instruction - And therefore every time COP is
  2294.         entered by a crash.
  2295.  
  2296. -       bit definitons. Useful for giving readable names to bits, but
  2297.         not used by the disassembler (there are way to many of them).
  2298.  
  2299. -       New with version 1.52 of COP, lineA-emulators can be named, too.
  2300.         These traps are never used by the AmigaOs, but function as Os-
  2301.         calls for a macintosh or Atari-ST emulator.
  2302.         
  2303. The syntax of a ddt file is a strange mixture of the syntax of the CBM
  2304. .fd-files and assembler include files, so you can use your .FD-files
  2305. and include files WITHOUT ANY CHANGE, provided you use the CBM macros
  2306. defined in exec/types.i and provided that you do not use forward 
  2307. references, as they are not supported.
  2308.  
  2309. Entries in the DDT are
  2310. i)      COPDDT-commands, a superset of the commands in the .fd files.
  2311.         COPDDT-commands are preceeded by two hashmarks and MUST be placed
  2312.         in the very first column.
  2313. ii)     Pure labels and function entries are given by their names and must 
  2314.         placed in the first column of the file, like labels in assembly
  2315.         language. As a special case, a label might be followed by a
  2316.         EQU or SET opcode. The first produces an equate label with
  2317.         a given value, and the second is ignored by COP since it is
  2318.         only used to keep track of the included files.
  2319.         If no value is given for a label, the contents is taken from
  2320.         the offset-counter which can be set by ##offset or ##bias.
  2321.         The type of the labels can be set by a COPDDT command pre-
  2322.         ceeding the label, except for labels defined by EQU, which
  2323.         are always equates.
  2324.         A pure label without EQU will always increment the ##offset
  2325.         counter by a size which can be set by ##increment.
  2326. iii)    Pseudoassembler commands which are named like the default CBM-
  2327.         macros in the exec/types.i file. They mostly define a label of
  2328.         a type defined by some COPDDT command above, and the value
  2329.         is also taken from the ##offset counter. However, the 
  2330.         increment depends on the pseudoassembler command.
  2331. iv)     Comments are introduced by a colon or an asterisk like in 
  2332.         assembly language.
  2333.  
  2334. Here the COPDDT-commands:
  2335. ##node name             Setup the next labels as labels relative to the
  2336.                         node with the given name. Should be used for
  2337.                         library offsets.
  2338.  
  2339. ##vectors name          Identical to ##node, except that it defines function
  2340.                         vectors. The label values should be negative.
  2341.  
  2342. ##guru                  Setup the next labels as numbers of guru-meditations
  2343.  
  2344. ##absolute              Setup the next labels as absolute addresses.
  2345.                         Never used with the Amiga-Os, since there is only
  2346.                         one fixed address (AbsExecBase), which is already
  2347.                         defined as a label. However, this type is used for
  2348.                         the low-memory variables of the macintosh Os
  2349.                         (what a horror !)
  2350. ##relative <expr>       Setup the next labels as offsets to the address
  2351.                         given by <expr>, which need not to be a number,
  2352.                         and may contain other evaluable labels. However,
  2353.                         forward references are not supported.
  2354. ##equate                Setup the next labels as pure equates.
  2355. ##linea                 Setup the next labels as line-a traps, as used by
  2356.                         the MacOs and Atari ST. Useless for the Amiga.
  2357. ##offset <expr>         Set the offset of the next labels relative to their
  2358.                         base. With amiga only useful for labels of ##node, 
  2359.                         ##relative or ##equate type, since there is only 
  2360.                         one fixed absolute address in the amiga and no
  2361.                         line-A emulators. Useful for ##absolute and ##linea
  2362.                         under MacOs and Atari ST.
  2363. ##bias <expr>           Set the negative offset of the next labels. Will
  2364.                         be used by .fd files to set library entries and is
  2365.                         identical to ##offset except that the value of
  2366.                         <expr> is negated (sign-changed).
  2367. ##increment <expr>      Sets the default incrementation value of the offset
  2368.                         counter. Should be set to -6 prior to including
  2369.                         .fd files, since each entry takes up 6 bytes, and
  2370.                         libraries grow to lower addresses. If you want to
  2371.                         define a table of LONGs, set the increment to 4.
  2372.                         This value is added to the ##offset counter every
  2373.                         time a pure label without a size gets defined.
  2374.                         Function entries in a .fd file are "pure labels"
  2375.                         in the sense of COPDDT.
  2376. ##base name             Define the name of a library base. Used by the
  2377.                         .fd files. Will define a label of offset
  2378.                         zero.
  2379. ##include name          Include another file in the ddt. There is NO
  2380.                         check for cyclic dependence, so WATCH OUT !
  2381.                         If the name contains spaces, include it in double
  2382.                         quotes.
  2383. ##end                   End an ddt file. Also used by .fd files.
  2384.  
  2385. ##private               Quietly ignored by COP, only used in fd-files
  2386. ##public                Also ignored.
  2387.  
  2388. Empty lines or lines starting with a colon or a star are read as comment-
  2389. lines and are ignored, too.
  2390.  
  2391. Label definitions:
  2392. A "pure" label is defined by giving only its name starting in the
  2393. first row of a line, like this:
  2394.  
  2395. ##absolute 8            ; Labels are of absolute type
  2396. ##increment 1           ; Set the increment of pure labels
  2397. mylabel                 ; comments are welcome ! This label gets the value 8
  2398. nextlabel               ; and this one 9, since the increment is 1
  2399.  
  2400. The value of the label to be defined is contained in the offset counter,
  2401. and it will be incremented by the value in ##increment every time.
  2402.  
  2403. Since fd-files contain functions and arguments, a (pure) label name is 
  2404. cut in the first occurance of a left bracket:
  2405.  
  2406. myFunc(foo)(a0)         ;this label gets called "myFunc" and got the value 10
  2407.  
  2408. Labels can be set to given values using the EQU pseudoassembler directive.
  2409. These "unpure" labels neither need the offset counter nor increment it.
  2410. All labels generated by this syntax are of equate type, regardless of the
  2411. previous COPDDT command.
  2412. TRUE            EQU     1       ; an equate. Can be evaluated, but is
  2413.                                 ; not used by the disassembler
  2414.                                 ; the offset counter is untouched, too
  2415.  
  2416.  
  2417. The set directive of assembly language is known, but will be ignored without
  2418. any checking:
  2419. ARGC            SET     §       ;in assembly language syntactically wrong,
  2420.                                 ;but completely ignored by COP.
  2421.  
  2422. The same goes for lines between a MACRO and a ENDM directive, since
  2423. COP does not support macros (and I think never will..).
  2424.  
  2425.  
  2426. Pseudoassembler commands:
  2427.  
  2428. They are called "pseudoassembler commands" cause they define labels in
  2429. assembly style, rather than .fd style. All macros in exec/types.i are
  2430. "emulated". The type of labels generated by them depend on the pre-
  2431. ceding COPDDT command, like ##absolute will generate absolute labels.
  2432. The value of the labels is given, as above, by the offset counter. This
  2433. counter can be set with the ##offset COPDDT command or the STRUCTURE
  2434. directive, and will be incremented by a value determinated by the
  2435. directive, unlike pure labels, which cause the value of ##increment
  2436. to be added.
  2437.  
  2438. Pseudoassembler directives MUST NOT start at the beginning of a line, but
  2439. MUST be preceded by spaces or TAB characters, like in assembly language.
  2440.  
  2441. Known directives are:
  2442.  
  2443.         STRUCTURE name,<expr>
  2444. Define a new label of given name as the base of a structure. The offset
  2445. counter will be initialized by <expr>, that is, the structure containes
  2446. unnamed field in the beginning of the size given by offset. The value
  2447. of the label defined will be zero relatively to a base, which can be
  2448. setup by ##node or ##relative. Defining an absolute structure does not
  2449. make much sense in this system.
  2450.  
  2451.         STRUCT name,<expr>
  2452. Define a substructure in a structure, that is, generate a label of given
  2453. name with the value as the value of the offset counter, and of type
  2454. given by a preceding COPDDT command. The offset counter is incremented by
  2455. the value of <expr> afterwards.
  2456.  
  2457.         LABEL name
  2458. Define a label with the value of the offset counter, which is not
  2459. incremented at all.
  2460.  
  2461.         UBYTE name[,<expr>]
  2462. Define one single byte, or array of bytes by generating a label. Its 
  2463. value is given by the offset counter, and its type is given by a preceding
  2464. COPDDT command. The offsetcounter is incremented by 1, if the expression
  2465. is ommited, or 1x<expr> to generate an array.
  2466.  
  2467.         BYTE name[,<expr>]
  2468. Same as byte.
  2469.  
  2470.         UWORD name[,<expr>]
  2471. Define one single word, or array of words. Works like BYTE, but the offset
  2472. counter is incremented by 2 or 2x<expr>. If the offset counter is odd, it
  2473. is rounded to the next even number.
  2474.  
  2475.         WORD name[,<expr>]
  2476. Same.
  2477.  
  2478.         BOOL name[,<expr>]
  2479. Same.
  2480.  
  2481.         ULONG name[,<expr>]
  2482. Defines one long word, or array of longwords. Increments by 4 or 4x<expr>
  2483. and alignes offset counter.
  2484.  
  2485.         LONG name[,<expr>]
  2486. Same.
  2487.  
  2488.         APTR name[,<expr>]
  2489. Same.
  2490.  
  2491.         CPTR name[,<expr>]
  2492. Same.
  2493.  
  2494.         FPTR name[,<expr>]
  2495. Same.
  2496.  
  2497.         FLOAT name[,<expr>]
  2498. Same.
  2499.  
  2500.         DOUBLE name[,<expr>]
  2501. Defines a IEEE-double precision entry or array. Increments the offset counter
  2502. by 8 or 8x<expr> and alignes it.
  2503.  
  2504.         UQUAT name[,<expr>]
  2505. Same.
  2506.  
  2507.         QUAT name[,<expr>]
  2508. Same.
  2509.  
  2510.         EXTENDED name[,<expr>]
  2511. Introduced in COP, defines MC68881 extended precision entry or array.
  2512. Increments the offset by 12 or 12x<expr> and aligns it.
  2513.  
  2514.         ALIGNWORD
  2515. Explicitly aligns the offset counter to the next word.
  2516.  
  2517.         ALIGNLONG
  2518. Align the offset counter to the next long word.
  2519.  
  2520.         ENUM [<expr>]
  2521. Initializes the ENUM-counter by the given value. Does not generate any label.
  2522.  
  2523.         ENUMITEM name
  2524. Generate a label of equate type. The value is given by the equate counter,
  2525. which will be incremented by one after the definition.
  2526.  
  2527.         BITDEF pre,post,<expr>
  2528. Generate two (!) labels. The first is of bit-type and will be named 
  2529. "preB_post" and will have the value given by <expr>. The second will be
  2530. named "preF_post", is of equate type and has the value of 1 << <expr>.
  2531.  
  2532.         IFD,IFND,ENDC
  2533. Ignored by COP
  2534.  
  2535.         INCLUDE
  2536. Ignored by COP. To include something, use the COPDDT command ##include.
  2537. This was mainly done to avoid unnecessary includes and to give the
  2538. control what will be included to the main DDT-file.
  2539.  
  2540.         LIBINIT
  2541.         LIBDEF
  2542. Also ignored by COP
  2543.  
  2544.         MACRO
  2545.         ...
  2546.         ENDM
  2547. Lines between MACRO and ENDM are ignored by COP, since it does not support
  2548. macros.
  2549.  
  2550.  
  2551. As noted above, the set of supported commands was choosen in a way such
  2552. that all orignal CBM-includes and .fd files can be used without a change.
  2553. Support of other style assembly include files (like DevPac's rs-counter)
  2554. are not supported and never will.
  2555. It is, however, sometimes necessary to explicitly define labels on one's
  2556. own. This happens mostly if the orginal include file defines useful
  2557. constants that should be relative to a base as equates. An example is
  2558. the definition of DOSBase in dos/dosextens.i. Since you cannot make
  2559. all labels relative to DOSBase, one must take this definition out
  2560. of the file.
  2561. Defining DOSBase as equates and not as node relative is of course not
  2562. illegal in COP, but will be of no use for the disassembler since it 
  2563. ignores equates (there are too many of them to be of any use). This was,
  2564. as a second example, necessary in defining the hardware offsets. 
  2565. Originally given as equates, they are now relative to the base of 
  2566. the custom chip set. See the included example ddt file. 
  2567.  
  2568. XIII) Precompiled files
  2569. -----------------------------------------------------------------------------
  2570.  
  2571. The 1.60 version of COP introduces the option to "precompile" DDT files for
  2572. faster startup. If you give a name of a pre-file on the command line with
  2573. "PRE filename", additional to the "DDT" keyword, COP will try first to load
  2574. all labels from this pre-compiled header. If successfully, the DDT keyword
  2575. will be ignored. If the "PRE" file is not available, COP will parse the "DDT"
  2576. file as usual and will create this "PRE" file afterwards so it is available
  2577. for later use. 
  2578.  
  2579. The main advantage of precompiled "DDT" files is that they are way faster to
  2580. load, no parsing and no syntax check is required. The data format is 
  2581. completely internal, please do not touch these files - they are purely for
  2582. COPs use and maintained completely by COP itself.
  2583.  
  2584. One caveat of "PRE" files is that they aren't updated automatically if you
  2585. change the original "DDT" file and there can be ONE and ONLY one "PRE" file
  2586. for the complete set of macros. Writing a partial set of label definitions
  2587. in a pre-file isn't possible. Either all or nothing!
  2588.  
  2589. The consequence is that you:
  2590.  
  2591. - should delete the "PRE" file manually if you made changes to the source DDT
  2592. file. COP will then re-create the "PRE" file the next time it is required.
  2593.  
  2594. - should only precompile the first DDT file that is loaded, that is the
  2595. "startup.ddt" file. Since this is the only DDT file in most applications,
  2596. that's not a restriction. DO NOT TRY to write PRE files for DDT files you
  2597. include afterwards - as they will not only contain the label definition in
  2598. the additional DDT file but in ALL DDT files. Loading these labels later on
  2599. might confuse COP. 
  2600.  
  2601. As a rule of thumb: Only the Startup.DDT file should be precompiled.
  2602.  
  2603.  
  2604. XIV) Shell scripts
  2605. -----------------------------------------------------------------------------
  2606.  
  2607. Three shell scripts are provided with COP, to simplify work:
  2608.  
  2609. -Debug          Accepts a program name (full path required) and its
  2610.                 arguments to be debugged by COP. Will load the program
  2611.                 as if started from the Shell and set a breakpoint at the
  2612.                 first hunk.
  2613.  
  2614. -WBDebug        Accept a workbench program and, optionally, a secondary
  2615.                 selection, without .info. Starts the program and supplies
  2616.                 the arguments thru a WBStartup message, as if started from
  2617.                 the workbench.
  2618.  
  2619. -Calc           Evaluates the supplied argument. Labels are welcome, and
  2620.                 the radix defaults to decimal. However, problems may
  2621.                 arise if you use hex numbers cause the $ can cause
  2622.                 conflicts with defined shell variables. In this case,
  2623.                 enclose the argument in double quotes.
  2624.  
  2625.  
  2626. XV) COP and MuForce/Enforcer/Cyberguard
  2627. -----------------------------------------------------------------------------
  2628.  
  2629. COP 1.56 supports the Enforcer program if run on a MC68020 or MC68030, it
  2630. supports MuForce on any processor. It *might* support the Cyberguard, too,
  2631. but the 040 exception handler of this program is faulty and I won't recommend
  2632. this program for that reason.
  2633.  
  2634. There are two ways to run these tools together with COP, depending on which
  2635. output you need.
  2636.  
  2637. Method I):    Start MuForce first, then run COP. 
  2638. Don't remove it later. This is the recommended way.
  2639.  
  2640. This will redirect Enforcer hints directly to COP. Faulty programs will cause
  2641. a bus error exception, and you're now able to debug these programs directly.
  2642. The enforcer won't cause any ouput, running "Sushi" is not necessary.
  2643.  
  2644. If you made COP resident, the COP invokation line in the startup-sequence
  2645. should contain the "RESTOREVBR" keyword, too. This is needed because the
  2646. order of installation will be different once COP is resident - MuForce
  2647. will now install on top of the resident copy of COP, hence, messing COP's
  2648. vector base register. This option will re-direct the vector base to COPs
  2649. interal base.
  2650.  
  2651.  
  2652. Method II):    Start COP first, then load MuForce. It is possible to
  2653. remove MuForce later on, however.
  2654.  
  2655. The MuForce will work as usual with this setting, COP won't interfere in this
  2656. case.
  2657.  
  2658. However, as soon as COP is entered, it will complain about its vector base
  2659. being messed up by MuForce. You might want to simply ignore this warning.
  2660.  
  2661.  
  2662. MuForce and the FASTVBR option.
  2663. --------------------------------
  2664.  
  2665. That's a story of its own. If you want to run COP before MuForce, the 
  2666. FASTVBR option IS REQUIRED. This is simply due to the fact that otherwise
  2667. COP will locate the virtual vector base in the first 1K/4K of memory as 
  2668. usual - and this memory isn't available with MuForce.
  2669. Quite the same goes for keeping COP resident - it's in this case already
  2670. present when MuForce gets loaded, so FASTVBR is mandatory, too.
  2671.  
  2672. There's actually little reason NOT to use the FastVBR option except to keep
  2673. some badly written programs - mostly games - working.
  2674.  
  2675.  
  2676. XVI) COP and the 68060 / 68040
  2677. -----------------------------------------------------------------------------
  2678.  
  2679. The 1.61 release of COP should be able to support the 68060 processor - 
  2680. however, as most of the support code is untested, it is not quite clear if
  2681. everything works as expected. 
  2682.  
  2683.  
  2684. The following rules apply to COP and the 68060:
  2685. -----------------------------------------------
  2686.  
  2687. - Add the SET60 keyword to the command line option. That tells COP explicitly
  2688.   that it has to deal with the '060 processor. The execbase "AttFlags" flags
  2689.   field does not necessarely monitor the '060 processor correctly.
  2690.  
  2691. - Add the NOMMU keyword. The MMU operation is vital for '060 and '040 based
  2692.   systems, to mask certain regions of memory as "non-cacheable" as needed for
  2693.   DMA transfer and other reasons.
  2694.  
  2695. - Add the NOEMU keyword. COP will try to bypass the emulator traps to the
  2696.   68060 library. It is, however, not quite clear if this works as expected.
  2697.  
  2698. - Load the 68060 library BEFORE COP is run. This is usually done by the
  2699.   68060.library that gets loaded by SetPatch.
  2700.  
  2701. - Start COP after CyberGuard or Enforcer. This is the recommended way, but
  2702.   it is not yet quite clear if this works like it should. COP has to emu-
  2703.   late the access to the AbsExecBase location at address four, and this
  2704.   emulator code is quite tricky for the 68060. Even though I tried my best
  2705.   to test it with my 68030, it is not clear whether it works like it should.
  2706.  
  2707. - Add the FASTVBR option if you want to run COP before Enforcer/CyberGuard,
  2708.   or if you want to keep COP resident. Do not specify it otherwise.
  2709.  
  2710.  
  2711. COP and the 68040
  2712. -----------------
  2713.  
  2714. This should be less problematic, even though it is even less tested than
  2715. the '060 support code.
  2716.  
  2717. - Add the NOMMU keyword. It is required for proper DMA operation of '040
  2718. systems.
  2719.  
  2720. - Add the NOEMU keyword. COP will try to bypass the emulator traps to the
  2721.   68040.library. 
  2722.  
  2723. - Run COP after MuForce. Don't use the Enforcer because its design is too
  2724.   static to allow proper operation. Don't use CyberGuard because its
  2725.   exception handler is not working properly.
  2726.  
  2727. - Run COP after loading the 68040.library. This is usually done by the 
  2728.   SetPatch command anyways.
  2729.  
  2730. - Specify the FASTVBR keyword if you run COP before Enforcer, or if you
  2731.   want to keep it resident. Do not specify it otherwise.
  2732.  
  2733. - COP doesn't fix 040 writebacks on bus errors, which means that some
  2734. data might not be written out properly. This will be fixed, soon. Except
  2735. that, COP works on a 040.
  2736.  
  2737.  
  2738. XVII) Plans
  2739. -----------------------------------------------------------------------------
  2740.  
  2741. - Making the chip-buffer more transparent
  2742. - Better memory chunk support
  2743. - better disassembler, parts are already working
  2744. - a microassembler (in preparation)
  2745. - wildcards in node matching
  2746. - bitdefs should really be relative to something, but system includes
  2747.   do not give the information
  2748. - more macintosh support, thru a mac INIT.
  2749. - a MMU table lister ?
  2750.  
  2751. In the next time, there won't be...
  2752.  
  2753. - a floppy or harddisk support. There are so many filing systems and device
  2754.   drivers and I think using the 20K or more needed to implement this stuff
  2755.   can be used a better way.
  2756.  
  2757.  
  2758. XVIII) Final remarks
  2759. -----------------------------------------------------------------------------
  2760.  
  2761. COP should not be crunched or compacted since COP uses an internal overlay
  2762. format to load the debugger code if needed. To enter COP later with a
  2763. COP DISPLAY GO or equiv. the startup segment is loaded to memory only.
  2764.  
  2765. I wrote COP six years ago (1993) to find the reason of many crashes that
  2766. occured in my system. I found that most debuggers I knew were not
  2767. able to debug a system with execbase out of order or input.device crashed.
  2768. The first debugger I used to accomplish this task was the ROMWack, a very 
  2769. simple, but nevertheless useful one. 
  2770. It took a year to complete the first release of COP, so I can appreciate a
  2771. programmer's work and you should do so, too. Please use COP to find bugs
  2772. in your own code only, whenever every other debugger fails, e.g.
  2773. interrupt code or reset resident code. Use COP to find the reason of
  2774. system crashes that crash normal debuggers, but PLEASE DO NOT USE COP TO
  2775. FUMBLE IN FOREIGN CODE, since this will prevent people from writing
  2776. good programs. Not everthing is public domain today, support the good work
  2777. and buy software.
  2778.  
  2779. This program is decidated to all the bubbling idiots that debug own code
  2780. up to 4 a.m. in the morning ("It MUST work...").
  2781.  
  2782.  
  2783. P.S.: The reason for the crashes, if anybody cares, is the broken expansion
  2784. port in my A2000. Replacement motherboards are no longer accepted, because
  2785. I got a replacement now... (-;
  2786.  
  2787.  
  2788. Thank goes to:
  2789. -Oliver Spaniol for letting me debug this proggy on his '060.
  2790. -Mark Watson for his help with the '060 code.
  2791. -Werner Müller for providing a 040 and a (working) 6.2 motherboard for
  2792.  a bargain.
  2793.  
  2794.  
  2795.  
  2796. If you like this program, if you have any suggestions, if you want to get a
  2797. newer release of COP, write to:
  2798.  
  2799.  
  2800. Thomas Richter
  2801. Rühmkorffstraße 10 A
  2802.  
  2803. D-12209 Berlin
  2804.  
  2805. Germany
  2806. -------
  2807.  
  2808. or send electronic mail to
  2809.  
  2810. thor@einstein.math.tu-berlin.de
  2811.  
  2812.  
  2813. There's also a web site you should try:
  2814.  
  2815. WWW:    http://www.math.tu-berlin.de/~thor/thor/index.html
  2816.  
  2817.  
  2818.  
  2819. It might be possible that COP does not work on YOUR Amiga, some parts of
  2820. the code are very tricky and hardware dependent. I tried to avoid such
  2821. problems, but one can never know. If COP fails on your computer, send
  2822. me a mail and descripe as best as possible your problems. However, debugging
  2823. by mail is a complicate task....
  2824.  
  2825.  
  2826. Thank you for reading and have a good time...
  2827.  
  2828.         THOR    (December 1998)
  2829.